Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects simply to a non-technical, business audience. Over…
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.
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:
Techopedia’s editorial policy is centered on delivering thoroughly researched, accurate, and unbiased content. We uphold strict sourcing standards, and each page undergoes diligent review by our team of top technology experts and seasoned editors. This process ensures the integrity, relevance, and value of our content for our readers.
Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.
What is GitHub? GitHub is a vast platform that changes how software developers work together on projects. It's more than...
Maria WebbTechnology journalist
What is a Super App? A super app is a comprehensive mobile or web-based platform that offers a wide range...
Nicole WillingTechnology Journalist
What is Windows AI Studio? Windows AI Studio is a software development environment that allows developers to build generative AI...
Margaret RouseTechnology Expert
Trending NewsLatest GuidesReviewsTerm of the Day