COMP 310
Spring 2010

Lec 24: RMI...

Home  Info  Owlspace  Resources

Today we will continue with a more sophisticated example of RMI.

First, let's cover any remaining features of our super simple example from the last class...

Today's example has a "compute engine" on the server  which is served out as a remote object.   The client then sends a "computer task" to the server for it to execute, returning the result to the client.   The key issue here is that the server does not know a priori what the client will have it do

Download today's example:    (3/23/10:   Updated to include graceful shutdown of the class file server upon exit.   REGISTRY PORT CHANGED TO TCP 2099 -- CHANGE YOUR FIREWALL ACCORDINGLY.    The code was adjusted to assume a working directory that is the "bin" directory rather than the project directory to enable the code to be run from the command line.   CHANGE THE WORKING DIRECTORY IN ECLIPSE.   3/18/10:  Code was updated to fix a couple of typos in starting up the security manager and in setting the clas file server port.   Also, the server.policy was moved to the rmiUtils package, so it doesn't need to be manually installed anymore.  Please download this new version!)  

The security issues are considerably more complex than the example from the previous class.

Note:  To connect to the local machine, the client in the demo must use its IP address, not "localhost".    The IP address can be seen in the console of the server.   Hit "Enter" witht the cursor in the "Remote Host" text field to have the client connect to the server, which must already be running.

Parts of the system:

  1. Server
    1. Compute engine
    2. Class file server  (used by both client and server)
    3. MVC components
      1. Local view
      2. Remote view
  2. Client
    1. Compute task infrastructure
    2. Actual compute task
    3. MVC components





© 2010 by Stephen Wong