In 2001, Sun Microsystems proposed an open source point-to-point (P2P) protocol specification called JXTA (Juxtapose). These protocols are defined through a series of XML messages that allow any device connected to the network to exchange information and collaborate independently of the underlying network topology. The foundation of JXTA is the open source XML protocol, which allows it to be implemented in many modern computer languages, including Java SE, C/C++, C#, and Java ME.
JXTA can not only penetrate firewalls and NAT, but also achieve interconnection and interoperability in different network transmissions, demonstrating strong adaptability.
In the operation of JXTA, a virtual overlay network is established between P2Ps so that even if some P2Ps and resources are behind firewalls and NATs, they can still interact. Each resource is identified by a unique ID, which is a 160-bit SHA-1 URN (in the Java binding version), allowing P2P to maintain a constant identification number when changing location addresses.
As time goes by, the development of JXTA has encountered a bottleneck. In November 2010, Oracle officially announced the withdrawal of the JXTA project. As of August 2011, the JXTA project has not been restarted, and Oracle has not responded to requests to move the source code to the Apache 2.0 license.
JXTA defines several important protocols, including:
In JXTA, P2P is divided into two main categories: edge P2P and super P2P. Super P2P can be further subdivided into rendezvous P2P and relay P2P. Each P2P has a clear role in the JXTA P2P model, where edge P2Ps are usually defined as nodes with transient, low-bandwidth network connections. These nodes are often hidden behind corporate firewalls or access the network through non-dedicated connections. .
A rendezvous P2P is a special purpose P2P that coordinates other P2Ps in the JXTA network and provides the scope required for message propagation.
Relaying P2P allows those behind a firewall or NAT system to participate in the JXTA network, usually via a protocol that can penetrate the firewall, such as HTTP. All P2Ps participating in the JXTA network only need to meet the appropriate credentials or network/storage/memory/CPU requirements to become a rendezvous or relay P2P.
In JXTA, an advertisement is an XML file that describes resources in a P2P network (such as P2P, groups, pipes, services, etc.). Communication in a JXTA network can be viewed as the exchange of advertisements. Additionally, a pipe is a virtual communication channel used to exchange messages and data in JXTA and is asynchronous, unreliable, and one-way.
There are three basic types of pipes based on functionality: unicast pipes, unicast secure pipes, and propagation pipes. Each pipe is designed to provide a flexible communication mechanism to meet a variety of needs.
In JXTA, P2P groups provide message dissemination categories and logical P2P clustering. Each P2P is a member of the default group NetPeerGroup, but can also be a member of multiple subgroups. It is worth noting that P2Ps can play different roles in different groups; it may be an edge P2P in one group and a convergent P2P in another group.
Rendezvous P2P has an optimized routing mechanism that can efficiently propagate messages pushed by edge P2P. It operates based on a loosely consistent network model, where each Rendezvous P2P maintains a Rendezvous P2P View (RPV), which is an ordered list of known Rendezvous P2Ps. Because there is no mechanism to force all RPVs to be consistent across a JXTA network, an RPV may have a temporarily or permanently inconsistent view of other converging P2Ps. When an edge P2P publishes an ad, the index for that ad is pushed to the convergence P2P through a system called Shared Resource Dispersed Indexing (SRDI).
Whenever an edge P2P publishes an advertisement, the rendezvous P2P will utilize the Distributed Hash Table (DHT) function to forward the index to other P2Ps.
Through the process of random roaming, if the P2P responsible for the advertisement cannot be found, the query will be forwarded or aborted until a match is found or the limit of the RPV list is reached. This technology not only demonstrates the flexibility of JXTA, but also hints at possible challenges and opportunities in the future development of P2P networks.
In the future digital world, can P2P technology be further optimized to cope with more complex network environments and security requirements?