((lambda (x) (x x)) (lambda (x) (x x)))

Tuesday, November 18, 2008

LPT730 Lab #7 -- Magnet Links vs. Torrents

Magnet Links vs. Torrents

A torrent file is a small file which can be downloaded and, by providing the torrent to a compatible client (Azureus, uTorrent, Transmission, etc.), then used to download the file described by the torrent file in question. In the scheme used by torrents, the file to be distributed is segmented into a number of pieces, to each of which is applied the SHA1 hashing algorithm. The hash value for each piece is stored within the torrent file, and it is this series of hash values that is used to identify, recover, and reassemble the segments described.

Magnet links are an open standard for a URI scheme accomplishing a similar goal through slightly different means. In this case, the user is offered a specially formatted URI containing a hash value that will be used to identify the correct file. The idea behind a magnet link is that some external P2P program (such as Vuze, Bearshare, or DC++, among others) will be used to locate the file whose hash corresponds with that in the URI. Magnet links may use a variety of hash algorithms, but unlike torrent files, the file is not segmented before being hashed, and it is the entirety of the file that is used in the production of the hash value used.

Even before any technical factors are considered, the advantage rests solidly with the BitTorrent protocol, due largely to it's popularity among the general public: the use of torrent files to acquire a variety of forms of media has become popular even among non-technical users, and as such, the chances of a given reciever having the required software installed to handle a torrent file are higher than the chances of them having software compatible with the magnet link scheme.

When technical aspects are considered, the advantages posessed by the BitTorrent profile become even more apparent. The technique used by BitTorrent of segmenting files before hashing them means that a peer node need not possess the entirety of the desired file to begin providing it to a requesting client: posessing only some segments of the file in question, the peer node will nonetheless register a match when the hash of the requested file is presented to it, and can immediately begin transfer of the segment it posesses to the requesting client.

Secondly, the use of BitTorrent continues to make things simpler for the distributer as it can be guaranteed that clients seeking to access their file will be making use of a particular protocol (specifically, BitTorrent), unlike in the magnet link scheme (in which a client may be using any of a number of protocols to transfer the file in question). For the distributor, that makes it easier to reinforce the group of seeders with nodes under their own control simply by configuring them to seed the file over the BitTorrent protocol: there is no need to create a set of seed nodes for each of the possible protocols a client may turn out to be using.

To conlcude, I believe this one to be a clear win for BitTorrent.

No comments: