JXTA
From Wikipedia, the free encyclopedia
JXTA | |
Developer: | Sun Microsystems |
---|---|
Latest release: | 2.4.1 / 20 October 2006 |
OS: | Cross-platform |
Use: | Peer-to-peer. |
License: | Based on the Apache Software License |
Website: | http://www.jxta.org |
JXTA (Juxtapose) is an open source peer-to-peer platform created by Sun Microsystems in 2001. This platform is defined as a set of XML based protocols that allow any device connected to a network to exchange messages and collaborate in spite of the network topology. JXTA is the most mature P2P framework currently available and was designed to allow a wide range of devices - PCs, mainframes, cell phones, PDAs - to communicate in a decentralized manner.
As JXTA is based on a set of open protocols, it can be virtually ported to any modern computer language and these implementations are called bindings. The Java binding is the most mature implementation up to now, and there is a C/C++ version, JXTA-C/C++, that is being actively developed as well.
JXTA peers create a virtual overlay network that allows a peer to interact with other peers directly even when some of the peers and resources are behind firewalls and NATs or use different network transports. In addition, each resource is identified by a unique ID, a 160 bit SHA-1 URN in the Java binding, so that a peer can change its localization address while keeping a constant identification number.
Contents |
[edit] Protocols in JXTA
- Peer Resolver Protocol
- Peer Information Protocol
- Rendezvous Protocol
- Peer Membership Protocol
- Pipe Binding Protocol
- Endpoint Routing Protocol
[edit] Categories of peers
JXTA defines two main categories of peers: edge peers and super-peers. The super-peers can be further divided into rendezvous and relay peers. Each peer has a well defined role in the JXTA peer-to-peer model.
The edge peers are usually defined as peers that have transient, low bandwidth network connectivity. They usually reside on the border of the Internet, hidden behind corporate firewalls or accessing the network through non-dedicated connections.
A Rendezvous peer is a special purpose peer that is in charge of coordinating the peers in the JXTA network and provides the necessary scope to message propagation. If the peers are located in different subnets then the network should have at least one Rendezvous peer.
A Relay peer allows the peers that are behind firewalls or NAT systems to take part in the JXTA network. This is performed by using a protocol that can traverse the firewall, like HTTP, for example.
It is worth noting that any peer in a JXTA network can be a rendezvous or relay as soon as they have the necessary credentials or network/storage/memory/CPU requirements.
[edit] Advertisements
An Advertisement is an XML document that describes any resource in a P2P network (peers, groups, pipes, services, etc). The communication in JXTA can be thought as the exchange of one or more advertisements through the network.
[edit] Pipes
Pipes are a virtual communication channel used by JXTA to exchange messages and data. Pipes are asynchronous, unreliable and unidirectional. There are basically three types of pipes:
- Unicast
- Unicast Secure
- Propagate
[edit] Peer groups
A peer group provides a scope for message propagation and a logical clustering of peers. In JXTA, every peer is a member of a default group, NetPeerGroup, but a given peer can be member of many sub-groups at the same time.
Each group should have at least one rendezvous peer and it is not possible to send messages between two groups.
[edit] Rendezvous network
The Rendezvous peers have an optimized routing mechanism that allows an efficient propagation of messages pushed by edge peers connected to them. This is achieved through the use of a loosely consistent network.
Each Rendezvous peer maintains a Rendezvous Peer View (RPV), a list of known rendezvous peers ordered by the Peer ID. There is not any mechanism to enforce the consistency of all RPVs across the JXTA network, so a given RPV can have a temporary or permanent inconsistent view of the other rendezvous peers. As soon as there is a low churn rate, that is, a stable network where peers don't join or leave too frequently, the RPV list of each peer will converge as each rendezvous peer exchange a random subset of its RPV with other rendezvous peers from time to time.
When an edge peer publishes an Advertisement, the index of this advertisement is pushed to the rendezvous through a system called Shared Resource Distributed Index (SRDI). After that, the rendezvous applies a Distributed Hash Table (DHT) function so that it can forward the index to another peer in the RPV list. For replication purposes, it will send this index to the neighbours of the chosen rendezvous peer in the RPV list.
The lookup process requires the use of the same DHT function to discover the rendezvous peer that is in charge of storing that index. Once the rendezvous peer is reached it will forward the query to the edge peer that published the advertisement and this peer will get in touch with the peer that issues the query.
If the DHT function cannot find a peer that is in charge of the advertisement then the query will forwarded up and down the RPV list until a match is found, the query is aborted, or it reaches the limits of the RPV list. This process is called random walk.
[edit] Applications
- MyJXTA - a general purpose P2P application that provides chat rooms, file exchanging, video and audio conferences
- WiredReach - an open source peer-to-peer Universal Content Sharing System
- List of companies/products using JXTA technologies