Reputation: 23206
There is a problem I cannot find the solution of :
How do I identify nodes in a pure peer to peer system that are all running the same application Foobar ?
In the above picture,let us suppose that all nodes are running the same application that is based upon pure peer to peer networking.
Note : I tagged this in Java because this is the language I want to work with.Instead of citing the name of libraries that already do that,please explain me the algorithm/way how I can do a search.I thought a lot about it but haven't understood how to make a search ? To get a feel of what are pure p2p systems, I want to write a small application that is based reflects a pure p2p system.It could be a simple chat application.
Upvotes: 0
Views: 924
Reputation: 1966
As mentioned above a directory service is popular with p2p networks like torrent networks etc.
For more "pure" p2p, you may read about Gnutella project.
... On initial startup, the client software must bootstrap and find at least one other node. Various methods have been used for this, including a pre-existing address list of possibly working nodes shipped with the software, using updated web caches of known nodes (called Gnutella Web Caches), UDP host caches and, rarely, even IRC.
Some other solutions may involve multicast for same network p2p
Upvotes: 0
Reputation: 46040
If you are asking about how to find the nodes, than this is what directory services are for - nodes register themselves on those servers.
If you are asking about how the nodes should be named - GUIDs work well or you can again use directory service for naming.
Upvotes: 1
Reputation: 41
It depends on the scale of your application. On a LAN, it's simple: you broadcast your existence (typically via predetermined multicast address).
On the greater Internet, routers block broadcast and multicast traffic, so there's no way to announce your presence. Instead, you need at least one peer as a seed, to discover the others. As each peer learns of others, it exchanges its knowledge with them.
Upvotes: 0