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.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access