- Protocol and API
- JXTA Goals
- JXTA Peer and Java
- Overview of the JXTA Protocols JAVA API
- Summary of Java API for JXTA Protocols
- Where JXTA Applications Begin
- The Peer
- Starting JXTA
- Peer Discovery Protocol API
- Peer Resolver Protocol API
- Peer Information Protocol
- Peer Membership Protocol
- Pipe Binding Protocol API
- Peer Endpoint Protocol
Where JXTA Applications Begin
JXTA applications need to be able to deal with the JXTA P2P network as the first thing they do. We call this booting the peer platform. This is very much like booting a computer on a network. The key difference here is that instead of a simple network, we are starting a peer in the JXTA network.
The JXTA platform is a group that implements the initial set of default behavior and protocols. The platform is also in the World peer group. The World group is the root of all other groups. Every peer is automatically added to the World group via the initialization of the platform.
Net Peer Group
The next thing that is done when starting a JXTA application is to load and join the Net peer group. The Net group is a specific group that is the default context for the peer. The World peer group has only limited capabilities and a very standard set of behavior. The Net peer group can be any group you desire.
The aim behind the separation of the root group is for supporting various devices. The JXTA's specification does not impose any kind of assumption about the peer capabilities, so they first join the basic world group (very easy to support) and then join other groups that may need to have more resources.
Most of the time, you will use the default Net group. The Net group is a placeholder to define a group if you need initial behavior that is different from the World group. The specific behavior includes different endpoints and knowledge of specific gateways or rendezvous. The Net group can also start monitoring services or even an initial application.
Another useful thing to do with a Net group is to specify a specific membership protocol. By placing the authentication in the Net group, you ensure that the peer is authenticated as soon as the platform boots. By becoming a valid member of the group, other peers can trust the peer. This trust can be used to prevent other peers from becoming a part of your P2P network. Normally this would only be done in a corporate network.
Starting peers in a group with secured membership is important for a P2P network that needs to be isolated. One reason for this is if all the cooperating peers are behind a firewall. Even though isolated, any other peer started behind the firewall could join. The new peer is free to interact with others on the corporate P2P. If the Net group does have a specific membership protocol, the peer booting into the network will be unable to interact with the other peers unless it joins with the specified membership.
Using a default membership may seem odd, but the simple fact is that all it takes is someone with a laptop and a JXTA peer running to compromise your P2P network.