Published on (
 See this if you're having trouble printing code examples

The Clip2 Report

The JuxtaNet


Related Articles:

JXTA Takes Its Position

Learning the JXTA shell

JXTA Shell commands

"Hello, JXTA!"

Joy Announces JXTA

More from the

With the unveiling of Project JXTA, not only is Sun introducing new building blocks for P2P development, but it is launching an open and decentralized peer-to-peer network. While JXTA can be used for P2P applications that operate in a closed environment such as an intranet -- and its success may ultimately be measured by its utilitiy in that domain -- a wider public JXTA network, the JuxtaNet, will form. The core JXTA protocols are the foundation for Sun's initial reference implementation, which in turn is the basis for Sun's example applications, including the Shell and InstantP2P. These applications give life to the JuxtaNet as they are run and instantiate peers that intercommunicate.

The JuxtaNet is significant in that it is an open, general-purpose P2P network. JXTA is abstracted into multiple layers -- core, service and application -- with the intention that multiple services will be built on the core, and that the core and services will support multiple applications. In fact, there is no constraint against the simultaneous existence on the JuxtaNet of multiple services or applications designed for a similar purpose. As an example, just as a PC's operating system can simultaneously support multiple word processors, the JuxtaNet can simultaneously support multiple file-sharing systems.

To better understand the JuxtaNet, let's compare it with GnutellaNet, another open and decentralized P2P network. Will the JuxtaNet have the sort of appeal that has attracted developers to GnutellaNet?

Gnutella's Attraction

Comment on this articleHave you explored JXTA? Tell us your first impressions and let others know what you've learned so far.
Post your findings

The Gnutella protocol was designed for a single purpose: to support decentralized P2P file-sharing. Progressive improvements driven by developer enthusiasm have enabled the resulting GnutellaNet to overcome major obstacles and experience substantial growth. By Clip2 estimates, the 13-month-old network currently encompasses about 25,000 simultaneous peers with approximately a quarter million unique peers active on any given day.

While it is effectively specialized, Gnutella does generalize along a few lines:

These points have all been causes for developer enthusiasm for the network. Generalization (or at least enhancement) of query interpretations was an inspiration of Gene Kan's InfraSearch demonstrator project and Clip2's earliest Gnutella work, and it remains a hot topic among developers, particularly LimeWire. Gnutella's use of HTTP spawned the transient Web meme and inspired a number of innovative GnutellaNet-Web integration projects. Finally, the open and interoperable nature of the network enables any developer to instantly harness the file content of the full extant network. The fact that Clip2's Gnutella protocol document has been downloaded tens of thousands of times is a measure of the GnutellaNet's continued attraction to developers.

Jex Appeal

In contrast to Gnutella, JXTA was designed for a multiplicity of purposes. Gnutella is one protocol (or perhaps 1.5 if you include its minimalist use of HTTP), while the JXTA core consists of several protocols. This difference is considerable and hard to overstate. A slightly exaggerated analogy: if Gnutella were a pocket calculator, then JXTA would be a PC.

Having just launched, the JuxtaNet has a relatively small population that will grow as JXTA applications are developed and adopted. Clip2 has begun continuous automated tracking of the JuxtaNet, and we now report current JuxtaNet metrics on our site. Based on the experience of the GnutellaNet, there are several reasons to expect developer enthusiasm for JuxtaNet from similar quarters:

Gnutella on JXTA?

Because of its focus on decentralized P2P file-sharing, decentralized distributed search is the crux of the Gnutella protocol. Such peer-to-peer content searching is not core to JXTA. Instead, this is precisely the sort of functionality well-suited for the service level between the core and applications. By way of example, and in anticipation of early demand for such a service, Sun has released a prototypical Gnutella-inspired Content Management Service (CMS) for JXTA and a simple application, InstantP2P, that utilizes CMS. Going back to the PC-and-word-processor analogy, one could regard InstantP2P as the Notepad of JXTA file-sharing applications. More elaborate applications could be implemented on CMS, and indeed CMS itself could be extended or supplanted.

We conclude with an interesting exercise for the reader that drives the point home that JXTA is a general-purpose set of lower-level building blocks. Your mission, should you choose to accept it: implement a decentralized P2P file-sharing application that adheres as closely as possible to Gnutella's search model (set of active connections, broadcast queries, routed responses) while using as much of the JXTA core and CMS as possible. Extra-credit enhancements relative to Gnutella, such as content interest groups, should be easy. Alternatively, certain aspects of JXTA, such as its asynchronous communication model, may require some creative workarounds. Write me at with your experiences.

Kelly Truelove is an independent research analyst who, via Truelove Research, covers peer-to-peer technology with a focus on P2P content search, storage, and distribution networks. He is regarded as a leading expert on consumer file-sharing systems, which he covers with a data-driven approach.

Copyright © 2009 O'Reilly Media, Inc.