Introduction


What is RMI

The Distributed Calculator:
A Simple Example

Scaling Up: Enterprise Concerns

Scaling the Calculator

RMI Future

Java RMI  -  the Distributed Calculator Project

by Dave Purdie

Project Description

The Java RMI classes enable a Java program to call (Java?*) objects and methods which reside outside the current runtime environment or namespace; i.e., a Java program can be invoked on one machine but call methods residing on a different host on which remote interfaces have been defined. The RMI toolset includes the use of Java Security Manager and RemoteException handling among other Java Native methods. This project will demonstrate the nature of RMI programming and the functionality of a distributed application through the design and implementation of a distributed framework and sandbox application.
 

Project Motivation and Goals

The use of RMI holds many implications for distributed design topics covered in DS420: 

  • marshaling
  • persistence of the state of distributed object instances
  • persistence of state under network or host failure 
  • recovery from total or partial session failures (only some of the distributed objects fail).
  • reinvocation of methods after session failure
  • effect of network delays on functionality
  • security
  • naming services
  • designing distributed components
  • designing interfaces to remote systems
  • comparison of RMI with other distributed architecture designs such as CORBA, DCOM, RPC, etc.
  • compatibility, interoperability with other distributed architecture standards
  • economics of RMI development including time-to-market and rapid prototyping
  • scalability of RMI solutions
  • relative efficiency of RMI as opposed to other designs
  • platform independence and/or interoperability


Many of these aspects have been noted in other parts of this project presentation as research or report items. While the technology of RMI in general provides opportunity for comprehensive investigations into many of these topics,  the more limited goal of the implementation phase of our project was to construct a simple working application which could be used to 

       1.) demonstrate general RMI functionality, 
       2.) offer possibilities for future expandability and 
       3.) serve as a model for future inquiry into some of the above topics.
 

The Distributed Calculator Project

Several possible project ideas were considered, including chat server and clients, a catalog lookup and order system, a distributed messaging system, and an implementation of SNMP or other simple network monitoring system.

The decision to implement a distributed calculator was based on the following factors:

  • a standalone version of the application would be simple to implement, 
  • the server application would lend itself to modularity and good object design
  • the client implementation could run as an applet, thereby yielding a graphic element and enhancing presentation quality
  • the calculator model is easily understood as a standalone application, so the aspects of its functionality as a distributed system would be clearly apparent
  • the individual calculator functions could be implemented as distributed functions, thereby:
    • providing a clear and obvious demonstration of distributed functionality,
    • offering an opportunity to distribute small coding projects among group members, which would thereby (hopefully)
      demonstrate the much more profound possibilities for distributed development as well!
       

The group agreed unanimously that the calculator example would constitute an interesting design challenge and provide a robust platform upon which we could explore various facets of RMI and test our understanding of the many theoretical issues involved in Distributed Computing. Furthermore, we agreed that while we had set high goals, the implementation of the calculator concept would provide a unique opportunity such that as much insight into RMI technology and Java programming could be gained from our implementation failures as from our successes. 
 
 

* footnote: although Java is generally thought of as a native Java-only, it is also possible that RMI can be used to construct and call wrappers for objects written in other languages as well.