0% found this document useful (0 votes)
61 views2 pages

Rmi !

Java Remote Method Invocation (RMI) allows a Java program on one machine to communicate with and invoke methods on objects residing in different address spaces. RMI uses object serialization to encode objects into byte streams that can be transmitted over the network, and stub classes on clients to invoke methods that are dispatched to remote objects on a server. The server-side runtime listens for invocation requests and dispatches them to the proper remote objects. While suitable for client-server web applications, RMI's current object serialization performance may not be adequate for high-performance distributed computing due to overhead.

Uploaded by

Nikita Luvs
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views2 pages

Rmi !

Java Remote Method Invocation (RMI) allows a Java program on one machine to communicate with and invoke methods on objects residing in different address spaces. RMI uses object serialization to encode objects into byte streams that can be transmitted over the network, and stub classes on clients to invoke methods that are dispatched to remote objects on a server. The server-side runtime listens for invocation requests and dispatches them to the proper remote objects. While suitable for client-server web applications, RMI's current object serialization performance may not be adequate for high-performance distributed computing due to overhead.

Uploaded by

Nikita Luvs
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Java RMI

Java Remote Method Invocation (RMI), which is a simple and powerful


network object transport mechanism, provides a way for a Java program
on one machine to communicate with objects residing in different
address spaces. Some Java parallel computing environments use RMI
for communication, such as JavaParty, discussed in next section. It is
also the foundation of Jini technology--discussed on section 2.1.5. RMI
is an implementation of the distributed object programming model,
comparable with CORBA, but simpler, and specialized to the Java
language. An overview of the RMI architecture is shown in Figure 2.1.

Figure 2.1: RMI Architecture.


Important parts of the RMI architecture are the stub class, the object
serialization, and the server-side Run-time System. The stub class
implements the remote interface and is responsible for marshaling and
unmarshaling the data and managing the network connection to a server.
An instance of the stub class is needed on each client. Local method
invocations on the stub class will be made whenever a client invokes a
method on a remote object. Java has a general mechanism for converting
objects into streams of bytes that can later be read back into an arbitrary
JVM. This mechanism, called object serialization, is an essential
functionality needed by Java's RMI implementation. It provides a
standardized way to encode all the information into a byte stream
suitable for streaming to some type of network or to a file-system. In
order to provide the functionality, an object must implement the
Serializable interface. The server-side run-time system is
responsible for listening for invocation requests on a suitable IP port,
and dispatching them to the proper, remote object on the server. Since
RMI is designed for Web based client-server applications over slow
network, it is not clear it is suitable for high performance distributed
computing environments with low latency and high bandwidth. A better
serialization would be needed, since Java's current object serialization
often takes at least 25% and up to 50% of the time [50] needed for a
remote invocation
RMI architecture consists of four layers and
each layer
performs specific functions:
1. Application Layer : contains the actual
object definition
2. Proxy layer : consists of stub and skeleton
3.Remote Reference Layer : gets the stream of
bytes from the
transperent layer and sends it to the proxy
layer.
4. Transportation layer : Responsible for
handling the
actual machine-to-machine communication.
 

You might also like