JXTA Overview


As opposed to the other technologies described in this chapter, JXTA is being developed to directly support and promote P2P. Project JXTA is a Sun Microsystems initiative, defined as an open source project to provide standard protocols for P2P applications and services. The JXTA platform defines a set of XML protocols designed to address the common functionality required to enable peers to form dynamic networks, independent of the operating system, development language, and network transport. It is an outgrowth of the recognition that P2P applications need a level of standardization to promote interoperability and attain widespread adoption. (JXTA concepts are discussed in more detail in Chapter 16, "JXTA and XML," and Chapter 17, The JXTA Shell.")

JXTA Defined

JXTA describes a typical P2P application using three layers; a core layer, a services layer, and an application layer (see Figure 4.4).

Figure 4.4. JXTA defines a three-layer architecture applicable to most P2P systems.

graphics/04fig04.gif

The core layer includes protocols and building blocks to enable P2P networking, including discovery, transport, security, and the creation of peers and peer groups. The elements of this layer are shared by all P2P solutions.

The services layer provides hooks for supporting generic services that are used in many P2P applications, but not necessarily all P2P applications. These include searching for resources, sharing files, and peer authentication.

The application layer is intended to support the types of applications that were highlighted in Chapter 3, such as file sharing, distributed storage, and instant messaging. These applications can be "vertical," or they can interoperate with other distributed applications developed to the JXTA core.

In addition to the layered architecture JXTA defines:

  • Protocols A standard format for representing and exchanging messages between peers. Each protocol is defined by one or more messages exchanged among participants of the protocol.

  • Messages A datagram consisting of an envelope and a stack of protocol headers with bodies. Each message has a predefined format. The format of the message is designed to support multiple transport standards. For instance, logical source and destination endpoints are defined in the form, or a URI. Endpoints are mapped to physical addresses using a messaging layer. Each protocol body can contain a variable number of bytes and credentials used to identify the sender to the receiver. The exact format and content of the credentials are not specified.

  • Pipes These simply represent communication channels for sending and receiving messages. Pipes are asynchronous and unidirectional, and a single pipe can be bound to one or more peer endpoints. JXTA defines a rather abstract definition of a pipe to enable a wide array of unicast and multicast communication implementations.

  • Advertisements An XML-structured document that names, describes, and publishes the existence of a resource, such as a peer, a peer group, a pipe, or a service.

  • Peer groups A collection of peers that share a common set of protocols.

Dynamic Networks

JXTA does not mandate a specific discovery implementation. It can be centralized, decentralized, or a hybrid model. However, the Java supplied examples do use a combination of directed unicast and multicast messaging.

The Peer Discovery Protocol (PDP) defines a low-level protocol for requesting advertisements from other peers, and responding to other peers' requests for advertisements. All resources in JXTA, peers, peer groups, pipes, and so on are represented as advertisements. Higher-level protocols can be built on top of PDP to provide specific discovery mechanisms.

The organization of information into advertisements simplifies the protocols required to make P2P work.

Identity and Presence

In traditional P2P networks, the identification of peers and resources uses network- or system-dependent identifiers. This could take the form of an IP address or a filename. JXTA attempts to be independent of the operating system or network transport. In a JXTA-compliant P2P network, any device should be able to participate, regardless of their operating system or network transport.

JXTA uses UUIDs to refer to peers, advertisements, services, and so on. A UUID is guaranteed to be unique only within a local domain. It is used as an internal identifier. The UUID becomes significant if it is bound to other information, such as a name or a network address.

It is anticipated that naming and binding services will be developed for the JXTA platform. Identity and presence services are not yet defined for JXTA, but are in development.

Security

JXTA is independent of specific security approaches; however, Version 1.0 defines a limited set of security primitives to support JXTA services and applications. These include password-based login, an authentication framework, simple access control, encryption, and limited transport security modeled after TLS/SSL.

The JXTA demonstration services, called InstantP2P and CMS (content management service), make use of additional security features provided by the underlying Java platform.

Standardizing P2P Protocols

As mentioned previously, JXTA is primarily focused with standardizing the protocols used by P2P applications and services to interoperate. XML has been chosen for the initial encoding. The benefits of XML are well documented.

The six main protocols provided by JXTA (per the specification) are a part of the core layer. Each protocol is independent from the others.

  • Peer Discovery Protocol This is the default discovery protocol. It enables a peer to find advertisements on JXTA resources.

  • Peer Resolver Protocol A query/response protocol that is used in conjunction with PDP to find or search for peers, peer groups, pipes, and other information.

  • Peer Information Protocol Enables a peer to inquire about other peers' capabilities and status.

  • Rendezvous Protocol Enables a peer to subscribe to a message propagation service.

  • Pipe Binding Protocol Enables a peer to establish a communication channel between one or more peers.

  • Endpoint Routing Protocol Enables a peer to query a router for available routes for sending a message to a destination peer.

All these protocols are implemented using a common messaging layer. This messaging layer is what binds the JXTA protocols to various network transports.

JXTA provides a far more abstract language for peer communication than previous P2P protocols, enabling a wider variety of services, devices, and network transports to be used in P2P networks. The employment of XML provides a standards-based format for structured data that is well understood, well supported, and easily adapted to a variety of transports.



JavaT P2P Unleashed
JavaT P2P Unleashed
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 209

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net