Chapter 4. Service Advertisement and Discovery
In the next few chapters, we’ll expand on the JXTA application interface and develop a complete JXTA application that is both a decentralized service and an application that uses the service. The complete example is spread out over a few chapters; we begin in this chapter by showing how to handle service advertisement and discovery. In later chapters, we’ll add the pipe communication between the service and application as well as handling some security issues.
An Auctioning Example
The example we’ll build will perform auctioning. Auctioning applications are great for demonstrating decentralized, P2P interactions between auctioneers and biders. The JXTA programming model can be applied with great simplicity to build a cost-effective and efficient auctioning system.
The Client/Server Auctioning Model
Auctioning systems are typically implemented with a centralized (client/server) auctioning server model (see Figure 4-1). The central auctioning server receives auction offers and bids, and matches them. While centralized auction architecture has some advantages, it presents some significant scalability, security, and reliability issues. The auctioning server needs to be scaled when the number of auctions and bid requests increase, as performance tends to decrease as more and more users are active on the system.

Figure 4-1. The client/server ...
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