what is rmi

what is rmi

1 year ago 65
Nature

RMI stands for Remote Method Invocation, which is an API in the Java programming language and development environment. It allows objects on one Java Virtual Machine (JVM) to invoke methods on objects running in another JVM. RMI is used to build distributed applications and provides remote communication between Java programs.

RMI is the Java version of what is known as a remote procedure call (RPC), but with the additional ability to pass one or more objects along with the request. It enables remote communication between applications using two objects: stub and skeleton. A remote object is created inside the server program, and a reference of that object is made available for the client using the registry. The client program requests the remote objects on the server and tries to invoke its methods.

RMI creates a public remote server object that enables client and server-side communications through simple method calls on the server object. The communication between client and server is handled by using two intermediate objects: Stub object (on client side) and Skeleton object (on server-side).

It is important to note that RMI has been deprecated in Java 9 and later versions in favor of other remote communication mechanisms like web services or Remote Procedure Calls (RPC).

Read Entire Article