As a Java developer with the task of building a new interoperating system, you need to consider several issues to deliver an excellent design that will scale up to support the system's future users. In the age of open source technology, Java developers rarely, if ever, need to start from scratch. The same is true with P2P technology. Bill Joy and Mike Clary at Sun Microsystems realized the problem with early P2P technology: Most early P2P technology is proprietary and incompatible in nature. The early works seemed to be completely enamored with the possibility of interoperability on as grand a scale as the Internet can provide, but they omit the ingredients of a mature, stable platform that developers can reuse for years to come. The result is a set of early P2P technology that forms closed communities and is incapable of having one P2P application leverage the services of another P2P application. Joy and Clary's work resulted in Project JXTA (pronounced juxta, short for juxtapose.) JXTA is available at http://www.JXTA.org. JXTA addresses the wider software development community's need for a common P2P language. JXTA is not a programming language; it provides a set of protocols that support interoperability among peers in a P2P environment. Although JXTA ships with a Java reference implementation, JXTA applications can be developed in any language, and can interoperate with other Project JXTA applications, regardless of their implementation language and underlying operating system, including .NET. JXTA defines three layers. The bottom layer addresses the communication and routing and P2P connection management. The middle layer handles higher-level concepts, such as indexing, searching, and file sharing. The top layer provides protocols that the applications use to manage the middle-layer services and lower-layer "plumbing" to build full-featured P2P applications. The top layer is where typical applications, such as instant messaging, network services, and P2P collaboration environments are defined. In JXTA, all protocols are defined as XML messages sent between two peers. JXTA messages define the protocols used to discover and connect peers and to access network services offered by peers and peer groups. Each JXTA message has a standard format, and may include optional data fields. So, JXTA standardizes the messages exchanged between peers by defining standard XML data streams used to invoke common functions or features of P2P services. Messages are sent between logical destinations (endpoints) identified by a URI. The transport must be capable of sending and receiving datagram-style messages. Endpoints are mapped into physical addresses by the messaging layer at runtime. The JXTA specification defines the following XML-encoded protocols:
JXTA makes two significant contributions to P2P technology. First, JXTA provides huge validation for building all future P2P technology with XML. JXTA protocols use self-describing XML definitions to move messages and manage the environment. Second, by providing a flexible and quality reference implementation, JXTA takes the Java development communities' focus away from basic P2P coding and on to solving P2P problems. P2P applications have matured, and are looking to increase interoperability among peers by defining standard protocols. P2P technologies will become more integrated into the network infrastructure so that more applications can utilize peer-computing services. Note JXTA is discussed further in Chapter 16, "JXTA and XML," and in Chapter 17, "The JXTA Shell." |