Home > Articles > Programming > Java

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Overview of the JXTA Protocols JAVA API

The JXTA protocols are based on XML messages. Each message is an XML document. The XML document defines its part in the communication and the data of the communication. These XML messages are passed between the peers to convey information or are exchanged as part of a longer communication with queries and responses. The sequencing of the XML messages, and the rules under which they are sent, completes the protocol.

JXTA for Java takes the obvious route to implement JXTA by mapping XML to classes and adding management, control, and the ability to extend a base advertisement to a more complex one by inheritance. This sounds like the system is well thought out, but there were and are a lot of growing pains.

Summary of the API

There are several base services that need to be performed in a peer-to-peer system. These services include discovery, membership, and communications. The JXTA protocols further break communications into pipe binding, endpoint, and resolver protocols. There is also a peer information protocol, which is similar to a network ping except that it can have more information about the peer.

Peer Group Modules, Services, and Applications

Each peer group has a set of services. There is a core set that is usually implemented that covers the JXTA protocols. Each service is a module, which is like a mini executable. Applications can also be a type of module. The UML diagram in Figure 3.1 shows these interfaces, their relationships, and the methods to implement them.

Figure 3.1 Module, Service, and Application interfaces.

The core services implemented by the reference platform are all derived from services. Each of these is displayed in Figure 3.2. Note that MembershipService is an abstract class and not an interface.

Figure 3.2 Core PeerGroup services and relationships to Service and Module

  • + Share This
  • 🔖 Save To Your Account