Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Coder's Corner Lounge (http://www.programmingforums.org/forum11.html)
-   -   Understanding P2P (http://www.programmingforums.org/showthread.php?t=15743)

kruptof May 1st, 2008 1:59 PM

Understanding P2P
 
I am looking at options for my final year project. I am thinking of doing this project which was suggested to me by one of my lectures,it involves P2P.

At the moment I don't know much about P2P so I am reading wikedpedia and other online articles.

But I have some difficulty understanding how a computer comes onto the P2P network. In wikepedia it says the software comes with preinstalled IP address of machines which are already on the network, but wouldn't that defeat the purpose of not making it centralised because if the main machines go down no new clients can get onto the network.

Freaky Chris May 1st, 2008 2:55 PM

Re: Understanding P2P
 
Thats true, i dunno i suppose one way to look at it is that to begin with you have 1 machine on and pass its ip to the next, each time a new pc connects its ip is shared to all other pc's connected. So every ip that ever connects is spread to every ip.

Just me thinking poorly xD

Chris

Dameon May 1st, 2008 3:35 PM

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.


All times are GMT -5. The time now is 9:17 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC