Distributed Computing Remote Method Invocation (RMI)
Distributed Computing Remote Method Invocation (RMI)
Distributed Computing Remote Method Invocation (RMI)
A remote method invocation from a client to a remote server object travels down through the layers of the RMI system to the client-side transport, then up through the server-side transport to the server.
Informing the remote reference layer that the call should be invoked.
Un-marshalling the return value or exception from a marshal stream. Informing the remote reference layer that the call is complete.
A skeleton for a remote object is a server-side entity that contains a method which dispatches calls to the actual remote object implementation. The skeleton is responsible for: Un-marshalling arguments from the marshal stream. Making the up-call to the actual remote object implementation. Marshalling the return value of the call or an exception (if one occurred) onto the marshal stream.
Also handled by the remote reference layer are the reference semantics for the server.
The remote reference layer, for example, abstracts the different ways of referring to objects that are implemented in
A primary goal for the RMI designers was to allow programmers to develop distributed Java programs with the same syntax and semantics used for non-distributed programs. To do this, they had to carefully map how Java classes and objects work in a single Java Virtual Machine (JVM) to a new model of how classes and objects would work in a distributed (multiple JVM) computing environment.
Managing connections.
Monitoring connection "liveness" Listening for incoming calls. Maintaining a table of remote objects that reside in the address space. Setting up a connection for an incoming call.
The transport for the RMI system consists of four basic abstractions: An endpoint is the abstraction used to denote an address space or Java virtual machine. In the implementation, an endpoint can be mapped to its transport. That is, given an endpoint, a specific transport instance can be obtained.
A channel is the abstraction for a conduit between two address spaces. It is responsible for managing connections between the local address space and the remote address space for which it is a channel.
In general, a class that implements a remote interface should do the following: Declare the remote interfaces being implemented Define the constructor for each remote object