Peermi: RMI over JXTA
javadoc contact download

Peermi is an extension of the standard RMI classes to enable true p2p, bidi rmi. Peermi includes a universal (Internet wide) lookup system like the rmi Registry and classes to facilitate multicast method calls. Using Peermi you can easily create a distributed, peer net application. For example the following code illustrates an application that finds the average temperature around the world.

//define the remote interface
public interface TempMonitor extends PeerRemote{
    public int getLocalTemp() throws RemoteException;

//remote implementation
public class TempMonitorImpl extends PeerRemoteObject implements TempMonitor{

    public TempMonitorImpl() throws RemoteException{
       super(true);//true means to bind this object by Class name in the PeerRegistry

    public int getLocalTemp() throws RemoteException{


public class AvgTempClient{

    public static void main(String[] args) throws Exception{
       PeerRegistry lookupReg = PeerRegistry.getLocalInstance();

       PeerManager<TempMonitor> managedListOfPeers =
                                        //this is the binding           //this is the interface type

       Thread.sleep(60*1000); //sleep so the PeerRegistry has time to find the peers.

       long totalTemp = 0;
       long peerCount = 0;
       for(TempMonitor peer : managedListOfPeers){
       System.out.println("Average global temp is"+(totalTemp/peerCount));

Peermi provides a Multicast class that would conduct the remote method invocations asynchronously. This would provide a large speed increase over a synchronized invocation like the example.


The Peermi source code is maintained at

To build from source:

# cvs checkout jxl
# cd   jxl/peermi/
# ant   jar

Once this is done, a directory called jxl/peermi/dist will contain all of the compiled jars and dependencies.

For more information on the Peermi system, review the api, contact us, or try the forums.