❮ Previous Next ❯

RMI(Remote Method Invocation)

To develop a distributed application in java, we use RMI mechanism. RMI is an API that provides a mechanism to create distributed application. The RMI allows an object to invoke methods on an object running in another machine(JVM).
It is providing a facility where remote communication is doing between the applications using two objects stub and skeleton. So let’s first understand about stub and skeleton.
RMI uses stub and skeleton object for communication with the remote object.
remote object is an object whose method can be invoked from another JVM.
The stub is an object present in client side. Basically it is a proxy object that means it represents the remote object. It acts as a gateway for the client side. When a method is invoked on the stub object, then it performs following tasks:

  1. It initiates a connection with remote Virtual Machine (JVM),
  2. It writes and transmits (marshals) the parameters to the remote Virtual Machine (JVM),
  3. It waits for the result
  4. It reads (unmarshals) the return value or exception, and
  5. It finally, returns the value to the caller.

The skeleton is an object, acts as a gateway for the server side object. All the incoming requests are routed through it. When the skeleton receives the incoming request, it does the following tasks:

  1. It reads the parameter for the remote method
  2. It invokes the method on the actual remote object, and
  3. It writes and transmits (marshals) the result to the caller.

  4. ❮ Previous Next ❯


Popular Links

Contact Us

address Plot No-741,2ND Floor
Opp. Bhagabati Temple,Jayadev Vihar
      Email: info@silantechnology.com
      Phone: 0674-2361252
39877, sundale dr, apt#101, Fremont, California 94538, USA
       Phone: +1(262)388-7619

facebook twitter google linked in

© 2018 Silan Technology. All Rights Reserved