Re: Re: enclosure status?
Dan Brickley <[email protected]> Sun, 10 Apr 2005 05:01:40 -0400
| Newsgroups | gmane.network.syndication.rss.devel |
|---|---|
| Message-ID | <[email protected]> |
* Lucas Gonze <[email protected]> [2005-04-09 15:05-1000] > > On Sat, 9 Apr 2005, Vadim Zaliva wrote: > About Bittorrent in particular, that's a tough nut to crack because BT is > so contrary to web architecture. There must be prior art for indirection > of that kind, though. ? In what way is BT contrary to webarch? http://www.w3.org/TR/webarch/ I guess the format of .torrent files is pretty inscrutable, where webheads might put some/all of it into XML or XML/RDF. Rummaging around... In http://www.bittorrent.com/protocol.html [[ "Metainfo files are bencoded dictionaries with the following keys:" announce The URL of the tracker. info This maps to a dictionary, with keys described below. The name key maps to a string which is the suggested name to save the file (or directory) as. It is purely advisory. piece length maps to the number of bytes in each piece the file is split into. For the purposes of transfer, files are split into fixed-size pieces which are all the same length except for possibly the last one which may be truncated. Piece length is almost always a power of two, most commonly 2 18 = 256 K (BitTorrent prior to version 3.2 uses 2 20 = 1 M as default). pieces maps to a string whose length is a multiple of 20. It is to be subdivided into strings of length 20, each of which is the SHA1 hash of the piece at the corresponding index. There is also a key length or a key files , but not both or neither. If length is present then the download represents a single file, otherwise it represents a set of files which go in a directory structure. In the single file case, length maps to the length of the file in bytes. For the purposes of the other keys, the multi-file case is treated as only having a single file by concatenating the files in the order they appear in the files list. The files list is the value files maps to, and is a list of dictionaries containing the following keys: length The length of the file, in bytes. path A list of strings corresponding to subdirectory names, the last of which is the actual file name (a zero length list is an error case). In the single file case, the name key is the name of a file, in the muliple file case, it's the name of a directory. ]] So I could imagine all that expressed in markup instead. [[ Metainfo file and tracker responses are both sent in a simple, efficient, and extensible format called bencoding (pronounced 'bee encoding'). Bencoded messages are nested dictionaries and lists (as in Python), which can contain strings and integers. Extensibility is supported by ignoring unexpected dictionary keys, so additional optional ones can be added later ]] Grabbing from http://www.legaltorrents.com/index.htm [[ danbri@fireball:~/Desktop$ more wired-creative-commons-cd.torrent d8:announce42:http://www.legaltorrents.com:7070/announce13:creation datei1098766145e4:infod5:filesld6:lengthi5848493e4:pathl32:01-beastie-boys-now-get-busy.mp3eed6:lengthi8484766e4:pathl31:02-david-byrne-my-fair-lady.mp3eed6:lengthi8044860e4:pathl26:03-zap-mama-wadidyusay.mp3eed6:lengthi12878571e4:pathl40:04-my-morning-jacket-one-big-holiday.mp3eed6:lengthi5928936e4:pathl20:05-spoon-revenge.mp3eed6:lengthi9528615e4:pathl27:06-gilberto-gil-oslodum.mp3eed6:lengthi8217290e4:pathl49:07-dan-the-automator-relaxation-spa-treatment.mp3eed6:lengthi10715627e4:pathl35:08-thievery-corporation-dc-3000.mp3eed6:lengthi6917415e4:pathl27:09-le-tigre-fake-french.mp3eed6:lengthi7693791e4:pathl43:10-paul-westerberg-looking-up-in-heaven.mp3eed6:lengthi7717832e4:pathl46:11-chuck-d-fine-arts-militia-no-meaning-no.mp3eed6:lengthi17020560e4:pathl51:12-the-rapture-sister-saviour-blackstrobe-remix.mp3eed6:lengthi17200259e4:pathl29:13-cornelius-wataridori-2.mp3eed6:lengthi8329130e4 :pathl43:14-danger-mouse-jemini-what-u-sittin-on.mp3eed6:lengthi9621615e4:pathl30:15-dj-dolores-oslodum-2004.mp3eed6:lengthi6588280e4:pathl34:16-matmos-action-at-a-distance.mp3eed6:lengthi3992e4:pathl29:wired-creative-commons-cd.txteee4:name25:wired-creative-commons-cd12:piece lengthi262144e6:pieces11520: ... ]] OK that's kinda inscrutable, but I wouldn't sat it's at odds with the Web's architecture, and it could be mapped into other notations easily enough. And I don't think that downloading info from multiple sources or the other protcol aspects is obviously counter to webarch (unless it uses HTTP GET for un-RESTful interactions? is that it?). cheers, Dan Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/rss-dev/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/