|
Re: Understanding P2P
Bootstrapping problem. Different networks solve this problem in different ways.
A fresh installation of Skype includes a list of supernodes to try. At least one of these must be online when the user first tries to connect. After the first connect, the client will build its own cache of hosts.
Gnutella/Gnutella2 require a list of 'discovery' addresses - simply web servers that hand out lists of hosts to try. These will be queried if there aren't any working hosts in the host cache.
Bittorrent typically depends on 'trackers', When you download a torrent file, one of the fields specifies a tracker address. Peers report progress to the tracker. A new peer that begins downloading the same torrent file will contact the same tracker, which will know about the peers currently downloading. The new peer will connect to existing ones and begin transferring data. If the tracker goes down, new peers can't join for the reason that you were concerned about. Existing peers can continue downloading.
At some point bittorrent added 'trackerless' torrents. Recent bittorrent clients will join a rather large distributed hash table consisting of other bittorrent clients on startup (check wiki for info on DHTs). Clients will 'announce' themselves to the DHT, storing their IP/port (value) to the torrent identifier (key). Similar to how a hash table would work on one machine, the key tells you where to look - given a key, one can quickly zero in on a host responsible for the torrent which you are interested in. DHT algorithms are actually very interesting - you should look up Kademlia and Pastry pdfs. As far as bootstrapping the DHT, clients know that, if all else fails, they can contact router.bittorrent.com to get some working peers.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
|