Introduction


What is RMI

The Distributed Calculator:
A Simple Example

Scaling Up: Enterprise Concerns

Scaling the Calculator

RMI Future

RMI Overview

by Yoonju Kim

Remote method invocation is a component of Enterprise Java that allows client Java programs to invoke server objects as if they were local. RMI applications work in pair - a server and a client. A server creates a number of remote objects, makes references to those remote objects accessible, and waits for clients to invoke methods on those remote objects. A client gets a remote reference to one or more remote objects in the server and then invokes methods on them. RMI provides the communication between these two and pass information back and forth.

The illustration below depicts an RMI distributed application that uses the registry to get references to a remote object. The server calls the registry to associate a name with a remote object. The client looks up the remote object by its name in the server's registry and then invokes a method on it. The illustration also shows that the RMI system uses an existing web server to load Java class bytecodes, from server to client and from client to server, for objects when needed. RMI can load class bytecodes using any URL protocol (e.g., HTTP, FTP, file, etc.) that is supported by the Java system.

In general, RMI is designed to preserve the object model and its advantages across a network.