According to the classical definition of a peer-to-peer network, peers that are part of this network should be able to run both as a client and as a server. This is what Jxta allows you to do.
Jxta is a platform for developing peer-to-peer applications. It supports the definition stated above, plus a lot of infrastructure features that most peer-to-peer applications might need. One example of such a feature is firewall traversal, which is done transparently for us. Also, it has some other very important qualities:
- It is open source and thus publicly available;
- It is programming language agnostic – there is at least a Java, a C++, a Ruby and a mobile implementation;
- It is communication protocol agnostic: it can run on top of TCP, HTTP, Bluetooth etc.
It is important to note that Jxta is not an API – that’s why it can be independent of the programming language. Jxta defines a set of protocols, that can be implemented in a variety of different platforms. Currently, these are the protocols specified by Jxta:
- Peer Resolver Protocol (PRP): provides the foundation for sending and responding generic queries between peers
- Rendezvous Protocol (RVP): used to help propagating queries between peers
- Peer Discovery Protocol (PDP): used to allow peers to publish and find resources (like other peers, services etc)
- Endpoint Routing Protocol (ERP): provides the mechanism that a peer can use to find routes to other peers, hiding low level details
- Pipe Binding Protocol (PBP): provides the means to make a connection between two peers
- Peer Information Protocol (PIP): used to get information from a peer, like its status or provided services for example
Those are of course very basic definitions of the protocols, but should be enough for now.
Jxta is not difficult to learn but it is extensive. If you are to fully use it, you have a lot to learn. You can find a lot of resources on the internet. There is the official site, which is the best starting point. And the community is active in the mailing lists. Also, I’m currently reading this book, which you can download for free.