Summary

In this chapter, we looked at the Java bindings that allow peers to discover service advertisements. All service advertisements are discovered in essentially the same way. We’ve also shown how a peer can join a peergroup once a peergroup advertisement is found. In addition, we’ve shown how to construct and publish service advertisements when they cannot be found.

The discovery of service advertisements (and, specifically, peergroup advertisements) is a key feature of the JXTA platform. JXTA does not rely on a central registry of services or any other piece of infrastructure; all that two peers need in order to communicate with each other is a network. As more peers join the network and discover common advertisements, the JXTA network becomes more robust.

At this point our peers have found each other, but they have no additional communication. In the next chapter, we’ll see how peers in a peergroup can communicate via pipes.

Get JXTA in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.