Sign in to follow this  

peer discovery in P2P

This topic is 3317 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In a P2P network how does a client join the network? I've heard that one way to approach this is have a server initially point to a connected peer then the client can build a list from that peer? Am I right? Are there any other methods for peer discovery?

Share this post


Link to post
Share on other sites
In a general peer-to-peer network, there are a few different ways to connect:

1) require the user to enter the IP address of at least one other peer

2) use "listing" servers that are not plain peers, but are servers keeping lists of nodes to start talking to

3) use distributed dynamic DNS, having nodes register themselves using one of some large number of known names (i e, peer0-peer99.mypeernetwork.net) and look up some of those when you start up

4) use local net broadcast to find other nodes, assuming the network is being used locally

5) generate random network addresses that are a "mutation" of your current network address (flip 1..8 random bits) and attempt to connect to that address. Repeat until you find a peer. (May take a long time to complete)

Once you have a connection to at least one other peer, you can exchange a list of known nodes with that peer. Note that especially 3) is almost entirely peer-to-peer, only the dynamic DNS service (which is generic for the Internet, not specific to your peer network) needs to be somewhat centralized.

One way to bootstrap the network would be to pick a random number between 0 and 99, and look up "peerNN.somedynamicdns.net." If you find a match, attempt to connect to that peer. If that succeeds, then you have a peer to talk to. If that fails, then you register peerNN.somedynamicdns.net to yourself, and then try to find a peer using successive DNS names, until you find a peer (or you have tried all known names -- in which case you're alone). You should only register for the first address you try, though, making space for 100 currently registered peers.

There is of course the generalized problem of trust and exploitation in peer networks. If someone wants to disrupt a peer network, there are many ways to do that, including providing false information, over-registering and under-delivering, etc. One of the reasons peer-to-peer networks won't work very well as the sole solution for services people pay money for.

Share this post


Link to post
Share on other sites

This topic is 3317 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this