The practice of peer-to-peer computing: IP Multicast-based discovery

URL: http://www-106.ibm.com/developerworks/java/library/j-p2pdisc2/

 

This article describes a set method for implementing a peer discovery protocol.  In this case, the author uses a multicast-based model to accomplish this task.  In effect, the multicast protocol allows one peer to broadcast to everyone in a group.  IP multicast doesn’t require a set connection which makes it a perfect protocol for the discovery of other peers.  In this example, a multicast packet will be used to announce both entry and exit from the schema, as well as a being utilized as a querying tool.   The only issue with this model is a hardcoded port and basic starting url.  This of course could be changed based on an xml file but there remains the problem of a starting url that is necessary.   If we were to use this model there would have to be one permanent server that would be running at all times to inform each peer of the peer groups that exist.   The author uses a messageFactory to produce the packets, but again, this factory would need to know which groups existed to be able to get the addressing correct.  Unfortunately the author never addresses this problem in the text, but one might be able to avoid the base server problem by randomly querying subnets using a statistical method to find computers that are listening on a certain port.   At this point, the computer will be expected to send an ACK packet and initiate some sort of connection.  In this case, we can do away with the base server requirement.