This blog is about providing theory as well as simple executable codes of different programming languages such as java, C, C++, and web programming, etc. This blog will be helpful to the IT students to learn about programming.

Wednesday, March 8, 2023

What is RMI? Explain With its architecture. Differentiate it with CORBA.

 RMI (Remote Method Invocation) is a Java API that allows distributed applications to communicate and invoke methods on remote objects. It provides a mechanism for a client to invoke methods on a remote object running on a server, as if the object were running on the client's machine. RMI is based on the Java Remote Procedure Call (RPC) mechanism.

The architecture of RMI consists of the following components:

  1. Remote interface: This interface specifies the methods that can be invoked remotely by a client.
  2. Remote object: This object implements the remote interface and provides the methods that can be invoked remotely by a client.
  3. Stub: This object is responsible for marshalling the parameters of a remote method invocation and sending them to the server.
  4. Skeleton: This object is responsible for unmarshalling the parameters of a remote method invocation and invoking the method on the server.
  5. Registry: This is a service that allows clients to look up remote objects by name.
  6. Client: This is the application that invokes methods on a remote object.
  7. Server: This is the application that provides the remote object and responds to method invocations from clients.


RMI can be compared to CORBA (Common Object Request Broker Architecture), which is a platform-independent, language-independent middleware system that allows objects to communicate with each other in a distributed environment. While both RMI and CORBA provide mechanisms for distributed communication and method invocation, there are some differences between them:

  1. RMI is a Java-specific technology, while CORBA supports multiple programming languages.
  2. RMI uses Java object serialization to transfer data between client and server, while CORBA uses a standard data representation called the Common Data Representation (CDR).
  3. RMI is simpler to use and has better integration with Java, while CORBA is more complex but offers more flexibility and interoperability.
  4. RMI provides tighter integration with Java's security model, while CORBA provides a more general security model.

In general, RMI is a good choice for Java-based distributed applications, while CORBA is a better choice for more complex, heterogeneous environments that involve multiple programming languages and platforms.

No comments:

Post a Comment

If you have any doubts, please let me know

Slider Widget