I'm curious as to how trackerless torrents work. I tried to search for information (presentations or something) about the DHT torrent protocol but couldn't find any valuable resources.
Could someone plea开发者_StackOverflowse provide a description or a link?
Well, there is the Wikipedia Distributed Hash Table page as an introduction. I don't think you're likely to find anything specific to how BitTorrent would use it, but there are known implementations of a DHT: Pastry and Chord.
I've read through the academic paper describing Chord and it gave me a pretty good idea of how the general DHT algorithm worked. And a slideshow from Carnegie Mellon starts talking about DHT on slide 37.
Of course, if you are looking for precisely how BitTorrent does it, you'd probably need to grab their reference implementation and look through the code.
I found the academic papers and DHT implementations to be very inaccessible. The following 2 links were sufficient to get my own implementation up and running. Read the first completely, and refer to the second when you need clarification.
- BEP 5 DHT Protocol
- Wikipedia: Kademlia
When in doubt, just make it up. Improve it later. DHT is horribly complicated to coordinate.
Bittorrent uses its own DHT implementation called Mainline DHT which is based off Kademlia.
Editor note: The majority of DHT torrent clients use MDHT, but Azureus (now called Vuze) uses its own version called ADHT which is different in behavior and incompatible with MDHT.
Mainline DHT on Wikipedia is a concise outline and description of the protocol. You can also read the design document.
A very good presentation with video and slides on how BitTorrent DHT works can be found here: BitTorrent Tech Talks: DHT
The talk is done by Arvid Norberg,
Chief Architect at BitTorrent, Inc
and the libtorrent/rasterbar developer.
精彩评论