JXTA

Project JXTA—the name (“jux-ta”) is short for Juxtapose, as in side by side—is a Sun Microsystems initiative that seeks to integrate p2p technologies as complementary and distributed tools into a mainstream computing and Internet environment. The actual core platform is a fully decentralized network architecture. However, both centralized and decentralized services can be developed on top of the platform.

It started as a research project incubated at Sun under the guidance of Bill Joy and Mike Clary. The goal is to explore a vision of distributed computing using peer-to-peer topology and to develop basic building blocks and services that would enable innovative applications for peer groups. Recognizing this effort would benefit from outside expert programmers, the project posted a specification draft and some prototype code to a Web site (www.jxta.org), encouraging others to join the efforts under the Apache Software License.

Project JXTA is currently still prototype status—that is to say, the posted code (written in Java) and reference implementation this defines is deemed usable, but it’s primarily intended as a jumping-off point for developers. It’s a small footprint implementation, around 250KB, not counting the JRE.

The current implementations support local network peers which don’t need to be connected to the Internet. The specifications additionally allow peer interaction over non-IP network protocols such as Bluetooth. Despite the early focus on Java, partly because of Sun’s active promotion of it, but mainly to easily achieve platform independence, the specifications are intentionally language-independent. Alternate implementations are supported and encouraged.

Table 10.2 shows the JXTA component summary. On one level at least, JXTA targets the global Internet in much the same way as .NET, by offering the potential of a generic infrastructure that supports all manner of peer applications. Unlike .NET however, JXTA leaves server dependencies up to the individual applications. It also has a clearer focus on broad support for even comparatively simple (for the most part, appliance-embedded) clients in arbitrary contexts.

Jxta Architecture

The intent of the JXTA architecture is that arbitrary network entities be able to find other network entities and collaborate with these in application-specified ways. It does not require any particular platform support by any of the participants but does specify the form and content of the discovery messages exchanged over the network.

Table 10.2. JXTA component summary
Component Specific forms Comments
Identity User or application defined, arbitrary within a peer group Defined by application and peer group context. Trust systems and digital signatures.
Presence Application defined Digital heartbeat minimum client requirement.
Roster Application defined Peer group, for example.
Agency Application defined Through services layer.
Browsing Application defined Application or services layer.
Architecture Core layer networking, services layer and application layer Modular based on common core for p2p networking.
Protocol Open and fully specified, encryption support Core protocols support all basic networking functions.

The architecture is described using three layers.

  • Application layer, which supports the implementation of integrated applications, such as file sharing, resource sharing, monetary systems, and distributed storage.

  • Services layer, which provides the API hooks for supported generic network services, commonly used by p2p applications. Typical examples include search functionality, sharing, and additional security features.

  • Core layer, which implements the essential protocols and components for p2p networking. This layer includes node discovery, and a transport layer with firewall handling and some security. It also supports the creation of peers and peer groups.

The entire design is a very modular one, allowing developers to pick and choose the services and applications that suit their particular needs. The common core makes it easy for developed services to be interoperable and particular applications to mix and match desired features using existing and new modules, or add them later.

Defined core protocols are NetPeerGroup Protocol, Peer Discovery Protocol, PeerGroup Discovery Protocol, Peer Information and Management Protocol, PeerGroup Membership Protocol, PeerGroup Resolver Protocol, and PeerGroup Sharing Protocol. All are fully open and specified.

Peers and Groups

Peers are defined in the JXTA context as any devices that support at least some of the Project JXTA protocols. A peer therefore can be anything with “a digital heartbeat” that supports the core layer. This definition can admit a whole range of devices, from servers, PCs, and PDAs, to cellular phones, and embedded manufacturing and medical equipment. The only requirement is that the peer needs to be connected to some kind of network, such as IP, Bluetooth, or Havi.

A peer group consists of any collection of peers that have agreed on a common set of rules to communicate between themselves, and to publish, share and access codats. Each peer group can establish its own membership policy, ranging from fully open to highly secure and protected.

Bit 10.3 Codats are the basic unit of information exchanged by JXTA peers.

A codat is a JXTA extension to Java objects that can hold both code and data.


Firewalls

Because JXTA peers rely on direct p2p communication, without a central server to mediate exchanges, it’s fair to ask how it deals with firewalled clients. The answer is pretty much the standard “push” model familiar from other atomistic p2p.

Clients on either side of a firewall must be aware of each other at minimum, usually by the firewalled peer reaching out to open a connection with some peer outside the firewall. A client can be configured to use a proxy. Clients are identified with unique identities, not any particular IP, so address translation across NATs is not a problem. As long as the firewall allows normal HTTP communication, possibly with more than the default port 80, the peers will be able to exchange messages.

Security Model

The heart of Project JXTA security is like so many other systems today based on the distributed public/private key signature and encryption scheme. Such a system provides strong and proven security, if set in a workable “trust” context.

The trust model, code-named a “ P2P Web of Trust”, is similar to the PGP “Web of Trust” used for secure e-mail, and it’s implemented to exchange public keys among its members. Varying degrees of trust are assigned to different members, formally or informally, but keys that are signed by trusted members acquire a trusted status, at least in the eyes of those who accept the trust of the signing member. A peer group policy may give some members the authority to sign public keys for other members, in addition to routine tasks such as authentication, adding or removing members, and removing or revoking memberships.

Both the JXTA core and application layers can access the security module, so any service or application can have its own security component or protocol plug-in.

Bit 10.4 JXTA security is essentially up to the implementations.

The JXTA layers provide all the commonly required mechanisms as ready-to-use modules, but it is the responsibility of the application to implement the degree and scope of security measures or possibly to customize its own modules.


Security classes exist initially for the common algorithms (RSA key exchange, RC4 cipher, and SHA-1 hash). Combinations of security classes form security suites, and customized extended suites can be added as required.

A separate Pluggable Authentication Module (PAM) handles peer group authentication. There is authenticated login support, including anonymous or “guest” users. Peer group security policy determines whether a login session is in clear or cipher-text mode.

Software Projects

The JXTA portal site (platform.jxta.org) provides up-to-date information about the status of support on the various platforms, and access to the most recent builds of demo software. Core software, services, and usable applications are available.

To provide a hint of overview, the next section gives the development state of JXTA as it appeared in December 2001. The core projects define the peer software.

Core Projects

The core components of the JXTA system are developed in the framework of a number of separate projects, listed in Table 10.3.

Table 10.3. JXTA core projects
Name Description Comments
di JXTA Distributed Indexing Core search functionality.
jxme JXTA for J2ME (CLDC/ MIDP) Provide JXTA-compatible functionalities on small memory devices (such as cellular, PDA).
jxta-c JXTA core C binding C-language binding for JXTA core.
jxtaperl JXTA core for Perl 5 An implementation of the core JXTA protocols in Perl 5.
jxtaruby JXTA core for Ruby Ruby implementation of the core JXTA protocols.
objc-jxta JXTA core Objective C An objective-c binding for the JXTA platform.
platform JXTA platform JXTA platform infrastructure and protocols for Java 2 SE.
pocketjxta JXTA for PocketPC Porting the JXTA platform to the PocketPC platform.
security JXTA P2P Security Project Core security and distributed trust mechanisms.
tini JXTA platform TINI binding Tiny Internet Interface, a Java virtual machine on SIMM-stick.

Services

This section specifies both core and optional JXTA p2p services. Required core services include Authentication, Discovery, and Codat management. Optional services are for example naming, routing, and codat indexing and searching. These services are used to build JXTA applications. The projects are listed in Table 10.4, and some are described in more detail here.

For example, it’s assumed that peers will both provide and receive certificates and digitally signed data, which makes it useful with an authority service that maintains common public root certificates and can validate certificate chains on behalf of peers. The Caservice Project is developing such a trust service.

Table 10.4. JXTA services projects
Name Description Comments
caservice Certification Peer service that can validate certificate chains.
cms JXTA Content Management System Early core service.
cpm Compute Power Market resource management Economics-driven computing platform and p2p marketplace.
edutella Query, replication, mapping, and annotation services RDF-based metadata infrastructure for p2p applications.
gisp Global Information Sharing Protocol (GISP) Distributed hash-selected query nodes for keywords.
ipeers Artificial Intelligence in P2P Networks (AIPN) Agent technology to create self-adaptive, intelligent networks.
jxrtl Task distribution using XML and peer matching Implements Active Networks in JXTA.
jxta-rmi RMI API on top of JXTA Java Remote Method Invocation extended to p2p context.
jxta-wire Multiway communication Provides a set of tools to allow many to many JXTA pipes.
jxta-xml-rpc Remote procedure calls JXTA transport binding implementation for XML-RPC.
jxtaspaces Distributed Shared Memory Service (DSMS) Programming distributed applications using a shared memory abstraction is less complex than explicitly using message passing.
jxtavfs JXTA Virtual File System Organizes JXTA network resources as virtual filesystem.
monitoring Monitoring and Metering Enhance and extend corresponding core functionality.
networkservices JXTA Web Services Integrates Web Services concepts and protocols into JXTA.
p2p-email Peergroup E-mail Peer e-mail group discussions using JXTA Peergroup technology.
payment Implements EPocketCash payment protocol Anonymous and secure financial transactions on Internet.
replication Replication/synch engine Peer replication of files and data (Plasmid, SyncML).
rrs Remote Rendezvous Service (RRS) Local and remote administration of rendezvous peers.
rvmanager RendezVous Manager (RVM) Help nodes coordinate to discover other peers and groups.
search JXTA Search Distributed search service for JXTA and Web content and services.

JXTA implements a Content Management Service, with sharing across peers in a peer group. Simple searching is provided across all peers in a peer group. For example, the InstantP2P application uses the CMS service to implement the search, share, and unshare shell commands.

The Compute Power Market (CPM) Project implements an competitive market economics approach to managing computational resources similar to what was described for Mojo Nation, in Chapter 8. The idea is to transparently access computing power as a network commodity and allow providers to offer cost-effective service on demand. CPM defines one or more interoperable marketplaces to bring together resource providers and consumers.

CPM deploys a Resource Agent to provide a mechanism for defining resource access policy and requirements (and pricing) and a Resource Broker to lease resources in the network for executing applications in such a way that user QoS demands are met. Smart algorithms make resource discovery, selection, and scheduling decisions.

The Edutella Project has a first application focus on a p2p network for the exchange of educational resources between German universities (including Hannover, Braunschweig and Karlsruhe), Swedish universities (including Stockholm and Uppsala), Stanford University, and others. The vision is to provide the metadata services needed to enable interoperability between heterogeneous JXTA applications.

The Global Information Sharing Protocol (GISP) Project aims for worldwide information sharing using a distributed hashed-index service. GISP doesn’t use broadcast query messages but takes information keywords and selects one peer to query for each keyword. The method is based on calculating the difference between the MD5 hash value of a keyword and MD5 hash values of different peer IDs, and selecting the peer with the smallest difference. A related core project is JXTA Distributed Indexing (di). The Jnushare Project, listed under applications, is an implementation of GISP.

The Ipeers Project is developing agents that automatically adapt to the network environment and that can bridge offline times for peers by continuing to act on their behalf on the network.

The JxtaVFS Project is about managing virtual files, which are dynamic files mapped to remote resources. It is a way to create a distributed, self-maintaining, yet hierarchical map of resources on the network. Each deployed instance of a JxtaVFS service is just one reflection of how a set of resources is organized in perspectives, knowledge of how these resources are categorized. Multiple instances of JxtaVFS can be aggregated together to form larger directory units that map the current availability of peer resources on the network.

The P2P-E-mail Project is an open standard framework to create and manage sustained group communication for spontaneous lightweight peer groups. It adheres to the implicit peer group organization as well as the transient, decentralized nature of p2p communications, with the intent to give an e-mail-like user experience. In later development, it must also provide security (encryption) and other-peer backup of messages for disaster recovery.

The goal of the Payment Project is to implement the EPocketCash payment protocol for financial transactions for JXTA, which allows anybody to be merchant or customer at the same time with the same account. This anonymous payment system will work on any device connected to the Internet—currently supported are Web, WAP, and I-Mode phones. Like other e-payment systems, its success hinges on how ubiquitous and transparent the infrastructure becomes for the average user.

The JXTA Search Project is an ambitious framework to have peers provide distributed network and Web content search functionality. It has its foundation in, among other things, the InfraSearch project mentioned in Chapter 3. Not only does JXTA Search intend to route and process queries but also to provide a notification service by indexing queries and tracking publication, leveraging the core di service.

Application Projects

These projects are to develop JXTA applications that enable interactive access to the JXTA P2P platform. Most are very lightweight; Java implementations with downloads in the 100Kb range. Table 10.5 lists the current ones.

Table 10.5. JXTA application projects
Name Description Comments
allhands Event notification Test JXTA use as a messaging and publishing KB framework.
brando P2P Java source code sharing tool Allow developers to work together without a central CVS source control system.
configurator GUI configuration tool for the JXTA platform Under development.
dfwbase Peer network with a database at each peer A distributed knowledge base application.
gnougat Fully decentralized file caching Distribution of static file content. Also allows file sharing.
jnushare File sharing of GISP File-sharing application using CMS.
juxtaprose Text content sharing, using existing XML CMS For Web and discussion. Also find, browse, and annotate JXTA resources in general.
jxauction Auction software Develop an auction software that can be used on any Internet-connected device (such as mobile).
jxta-httpd JXTA Web publishing Provides a set of JXTA services and tools for Web publishing.
myjxta (instantp2p) JXTA Demonstration GUI (Group Chat, Chat, Search, Share) MyJXTA replaces and enhances the functionality of the former InstantP2P GUI.
parlor Collaborative p2p spaces (tabletops) Application framework for creating collaborative spaces.
project2p Share project documentation Content p2p sharing in development contexts.
rosettachat Messaging Localized JXTA peer text messaging (real-time chat translation).
shell JXTA Command Line Shell For interactive access to JXTA platform (for developers).
www Special “project” that collects information HTML documents and information about JXTA.

InstantP2P, now called myJXTA in its latest and enhanced implementation, is a Project JXTA demonstration application, designed to implement the most common p2p functionality sets of messaging, peer group chat, search, and file sharing.

The graphical user interface in myJXTA, shown in Figure 10.4, allows the user to create and join groups for chat. By default the client downloads a predefined set of Rendezvous and Routers that mediate such peer group contacts, but this list can be redefined. In addition, the local peer can be configured to act as a rendezvous and router peer itself. Not a polished application, albeit steadily improving build by build, the main purpose of myJXTA is to be a functional template for developers.

Figure 10.4. A simple graphical interface in myJXTA allows a JXTA peer user to easily access chat, group chat, search, and share functionality.


The JXTA Shell is an optional command-line interpreter application to enable users and developers to interact with the JXTA platform. The shell application can be used to monitor the status of peers or peer groups, to access and manage core platform objects (such as peers, groups, pipes), to communicate with “external” JXTA services and applications, and to debug for example communications problems. It functions in a manner similar to *nix-style system shells.

Gnougat is actually a fairly Gnutella-like “servent” (Chapter 7) implemented in JXTA technology. The crucial and innovative features of its protocol lie in how it identifies files and handles queries. Content ID is uniquely based on a hash of the content itself, which allows easy identification of duplicates for cases where parallel download of variable-sized fragments is feasible. Although queries (both for text and hashes) are broadcast and hits trickle back in the usual atomistic search manner, participating clients aggressively cache hit descriptor information based on visible demand and hit frequencies. The resulting adaptive behavior reduces overall network traffic in that more nodes can return valid hits that point to the correct source.

Figure 10.5 shows a capture from the sharing tab of the Gnougat client. Connection management and caching are not fully developed yet, so at the time of writing, it’s more a proof-of-concept client than a deployable peer system. Like all things in this field, that status can change rapidly.

Figure 10.5. Gnougat is an atomistic, Gnutella-like file-caching and file-sharing client for JXTA. Still very much in development, the implementation does showcase a number of interesting network-optimizing features.


A number of the projects are still in proposal or planning stage but are interesting nonetheless. JXTA should be seen primarily in terms of providing an alternative, decentralized, peer framework with open source functionality that can match or surpass the centralized and proprietary .NET vision. It’s far too early to say if one or the other, or neither, will come to dominate the future Internet. The open source aspect of JXTA however does suggest that the academic and Linux worlds will tend to support it more than any .NET solutions.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.129.19