Home > Articles > Programming > Java

  • Print
  • + Share This
From the author of

From the author of

The JXTA Protocol Stack

The Project JXTA team, driven by their desire to serve all P2P applications, produced the JXTA v1.0 Protocols Specification. The specification defines the basic building blocks and protocols of P2P networking:

  • Peer Discovery Protocol. Enables peers to discover peer services on the network.

  • Peer Resolver Protocol. Allows peers to send and process generic requests.

  • Rendezvous Protocol. Handles the details of propagating messages between peers.

  • Peer Information Protocol. Provides peers with a way to obtain status information from other peers on the network.

  • Pipe Binding Protocol. Provides a mechanism to bind a virtual communication channel to a peer endpoint.

  • Endpoint Routing Protocol. Provides a set of messages used to enable message routing from a source peer to a destination peer.

Each JXTA protocol defines a set of XML messages to coordinate one aspect of P2P networking. Some of the protocols build on another protocol's capabilities, as shown in Figure 1.

Figure 1Figure 1— The JXTA protocol stack.

Each protocol is semi-independent of the others. A peer can elect to implement only a subset of the protocols to provide functionality, while relying on prespecified behavior to eliminate the need for a protocol. For example, a peer could rely on a preconfigured set of router peers and, therefore, would not require an implementation of the Endpoint Routing Protocol.

However, the protocols aren't entirely independent of each other because each layer in the JXTA protocol stack depends on the layer below to provide connectivity to other peers. For example, although it would be possible to build an independent implementation of the Peer Discovery Protocol, it wouldn't be very useful without an implementation of the Peer Resolver and Endpoint Routing Protocols to handle transporting its messages to remote peers.

Each protocol conversation is divided into a portion conducted by the local peer and another portion conducted by the remote peer. The local peer's half of the protocol is responsible for generating messages and sending them to the remote peer. The remote peer's half of the protocol is responsible for handling the incoming message and processing the message to perform a task. Peers can elect to implement only one half of a protocol to provide a peer optimized for one specific task. However, despite the allowance for partial implementations, the JXTA specification recommends that peers completely implement all the protocols.

  • + Share This
  • 🔖 Save To Your Account