JXTA Notes
peer - As defined in the JXTA specification, a peer is a device that implements one or more JXTA protocols. The key idea is that something implements the protocols.
- A single machine can host multiple JXTA programs, each of which is really a peer. The program is really a virtual device.
- A single JXTA peer could be a distributed application running across multiple machines.
- peer IDs are often saved by the JXTA platform itself when it performs caching.
- Peers self-organize into groups. JXTA does not define what these groups are, nor why they exist: the JXTA framework supports the creation of groups and the definition of group membership, but it is up to cooperating peers to define groups, join groups, and leave groups.
- In order to participate in an auction, a peer must find a JXTA peergroup that provides an auction service. The peer must join that group; only peers that have joined the group can use the services available in the group.
- A service is a specific type of JXTA resource. A peer that wants to use the resources of a particular peergroup must join that peergroup. Similarly, peers can communicate only with each other if they have joined the same group (although, as we'll see, all peers belong to the NetPeerGroup, so they can always communicate with each other).
- Because of their membership requirement, peergroups form an entity with a logical boundary. Peergroups may strongly enforce a membership requirement so that the boundaries define a secure environment as well: content within a peergroup can be accessed only by peers belonging to that group, so a peergroup with strict membership requirements can secure its content from the rest of the world.
- Peergroups are typically formed and self-organized based on the mutual interest of peers. No particular rules are imposed on how peergroups are formed. Peers with the same interests tend to join the same peergroups. Therefore, the abstract regions defined by a peergroup provide an implicit scoping mechanism for peergroup operations. Peergroup boundaries delimit the search horizon when looking for peergroup resources. Peergroup scopes help scalability by reducing network traffic explosion within the JXTA network. Messages within a peergroup are propagated only to peers that are members of the peergroup.
- Peergroups enable peers to monitor members, interactions (traffic introspection, accountability, traceability, etc.)
Two Types of Peergroups
- NetPeerGroup
- default peergroup a peer joins after booting the JXTA network;
- Configuration of the NetPeerGroup is typically done by the administrator in charge of the network domain on which the peer is located.
- User peergroups
- create new peergroups with their own set of customized services and membership policies
- All user peergroups are subsets of the NetPeerGroup
- Depending on the group, the peer may have to present authentication credentials, and the group will vote on the peer's application.
- Peergroup services
- Discovery service
- Membership service
- Access service
- Pipe service
- Resolver service
- Monitoring service (sometimes called the "purines" service)
- Rendezvous service
- The membership service is necessary to enforce a policy for new peers to join a peergroup.
- The discovery service is necessary for a peer to discover new network resources (so a peer can expand its capabilities).
- The resolver service provides the essential infrastructure for services to communicate.
- The pipe service provides the ability for one or more peers to exchange messages.
- peers discover other peers, and they also discover peergroups, pipes, advertisements, and other resources. There are two ways in which peers discover resources: peers discover resources dynamically, and they use special, statically configured peers to tell them about JXTA resources. Discovery occurs within the context of a peergroup: a peer attempts to discover resources within a specific peergroup.
JXTA Peer Discovery Protocol (PDP)
- On an IP network, it consists of two parts: a multicast message that is sent on the local network and the use of rendezvous peers to discover peers beyond the scope of the local network. Other network bindings will behave differently, but the essential operation of the PDP is that the requesting peer sends a message, and resources that hear the request will respond directly to the peer.
Rendezvous peers
- These peers are like lookup services: they keep a list of peers (and other JXTA resources) that they know about, and other peers query them for that list.
- Peers may discover rendezvous peers dynamically and use them in place of these; the intent of the bootstrapping rendezvous peers is to initiate the discovery process of dynamic rendezvous peers.