Difference between revisions of "Protege Client Server RMI"

From Protege Wiki
Jump to: navigation, search
(Tunneling RMI out of a private network)
Line 14: Line 14:
 
# The client goes to the RMI registry to get the remote object bound to a particular name.
 
# The client goes to the RMI registry to get the remote object bound to a particular name.
 
# The client invokes the remote object and contacts the server.
 
# The client invokes the remote object and contacts the server.
 +
 +
  
 
= Tunneling RMI out of a private network =
 
= Tunneling RMI out of a private network =
  
 
= Exporting RMI from a NAT'd server =
 
= Exporting RMI from a NAT'd server =

Revision as of 20:45, February 22, 2009

How Does RMI Work?

This page is part of the Protege client-server tutorial.

First a disclaimer. I am not an expert on the RMI protocol. The following is based on observations of how the RMI protocol behaves and debugging problems that can happen in ordinary practice. This behavior is further confirmed by the "black magic" tricks (running an rmi server through NAT and tunneling a connection to an rmi server) that we describe in this section. I enthusiastically encourage others to correct or improve these pages.

This page discusses the interaction of a server, rmi registry and a client. The simplest case is shown in the figure below.

RMIProtocol01.png

The steps in the protocol are:

  1. The server registers a remote object with the RMI registry giving it a name. Inside the remote object is the hostname of the server. It turns out that this hostname comes from the -Djava.rmi.server.hostname=... jvm parameter.
  2. The client goes to the RMI registry to get the remote object bound to a particular name.
  3. The client invokes the remote object and contacts the server.


Tunneling RMI out of a private network

= Exporting RMI from a NAT'd server =