ALERT

[LAST CHANCE] Data Layer: Modern Business, Defined

Remote Method Invocation (RMI)

Definition - What does Remote Method Invocation (RMI) mean?

Remote method invocation (RMI) is a distributed object technology developed by Sun for the Java programming language. It is available as part of the core Java application programming interface (API) where the object interfaces are defined as Java interfaces and use object serialization.

RMI permits Java methods to refer to a remote object and invoke methods of the remote object. The remote object may reside on another Java virtual machine, the same host or on completely different hosts across the network. RMI marshals and unmarshals method arguments through object serialization and supports dynamic downloading of class files across networks.

Techopedia explains Remote Method Invocation (RMI)

Remote method invocation was first introduced in Java Development Kit (JDK) 1.1 and is extensively used in distributed object computing. It performs the object-oriented equivalence of remote procedure calls. RMI functionalities come in a java.rmi package and provide a distributed object capability for Java-based applications.

RMI architecture extends the robustness and safety of Java architecture to the distributed computing world. RMI allows the that code defines and implements the behavior to remain on different Java virtual machines. Remote services in RMI are coded using a Java interface where the implementation is coded in a class. In the first class, implementation of the behavior runs on the server. The second class runs on the client and acts as a proxy for the remote service.

RMI implementation is built from three abstract layers - the stub and skeleton layer, the remote reference layer and the transport layer. The stub and skeleton layer is just below the view of the developer. Stub and skeleton objects are used to provide a connection between the client and remote object. A stub forwards method invocations from the client to the server and is aware of how to communicate with the stub across the link. Therefore, it acts as a proxy where the remote object implementation resides. Reference to the remote object by a client is literally a reference to the local stub. The client houses a local copy of the stub object. Skeletons hold methods, which dispatch calls to remote object implementation.

The steps in designing an RMI application are:

  1. Define remote interfaces and implement client and remote objects.
  2. Compile the source and generate stubs and skeletons.
  3. Make required class networks accessible.
  4. Run the application.

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
Tweat cdn.techopedia.com
"Techopedia" on Twitter


'@Techopedia'
Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Resources
The 4th Era of IT Infrastructure: Superconverged Systems
The 4th Era of IT Infrastructure: Superconverged Systems:
Learn the benefits and limitations of the 3 generations of IT infrastructure – siloed, converged and hyperconverged – and discover how the 4th...
Approaches and Benefits of Network Virtualization
Approaches and Benefits of Network Virtualization:
Businesses today aspire to achieve a software-defined datacenter (SDDC) to enhance business agility and reduce operational complexity. However, the...
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.