Difference between RMI and CORBA
Last Updated :
01 Oct, 2024
In distributed computing two well-known technologies to communicate objects in different systems are Remote Method Invocation (RMI) and Common Object Request Broker Architecture (CORBA). As stated above, both RMI and CORBA facilitate communication between remote objects, but they do it in different ways, do it supported by different languages and use different architecture. In this article we will see difference between RMI and CORBA in detail.
What is RMI?
Remote Method Invocation (RMI) is a Java specific, technology that allows objects of different JVMs to communicate with each other. RMI applications have two components: the server and the client. The server deploys the remote objects and then simply awaits calls made on these objects from the client. Instead, the client derives remote references to the objects of the server and works with them.
Advantages of RMI
- Seamless integration with Java: RMI is a Java native technology and as such it can quite easily to be implemented in Java applications.
- Automatic garbage collection: The objects of RMI are easily collected for garbage collection by the JVMs hence they do not require memory collection by programmers.
- Dynamic class loading: The independent classes downloading offer flexibility because a client is able to get new classes from a remote JVM via RMI.
Disadvantages of RMI
- Java-dependent: RMI is supported only by Java which makes it unfit for systems that implemented with different languages.
- Tight coupling with JVM: It depends heavily on JVM which in turn makes it less integrated with other platform.
The RMI consists of three layers
- Stub/Skeleton layer
- Remote Reference layer
- Transport layer
The relationship among these layers is as shown in the following figure :
Figure - RMI ArchitectureWhat is CORBA?
Common Object Request Broker Architecture (CORBA) is a middleware that was designed to enable free flowing communication of objects that are distributed regardless of the underlying platforms, programming language or the OS. As the name suggests it is sometimes called a ‘software bus,’ that is, a communications framework that enables objects in different environments to find each other and communicate.
CORBA utilize an Interface Definition Language (IDL), which byte is employed to separate interfaces from the implementation code. Another example is that it can be implemented in various platforms including C++, Python and java hence improving its interoperation.
CORBA ArchitectureAdvantages of CORBA
- Language independence: One more advantage of CORBA is that it can be written in different programming languages, whereas only distinction with Hispanic is that CORBA is developed for different types of systems.
- Platform independence: Virtual machines obtained with the help of the CORBA environment can be easily installed on different operating systems and computer architectures without adding or erasing anything.
- Strong security features: Security is one of the important aspects; CORBA, at the same time, provides numerous opportunities to secure communications, which are often exceedingly important in distributed ones.
Disadvantages of CORBA
- No automatic garbage collection: CORBA does not facilitate automatic garbage collection which in turn results in some problems with respect to memory management.
- Complex implementation: CORBA has been said to have more conceptual overhead than RMI, that is, it takes more effort to set up and manage CORBA than it does for RMI.
Difference between RMI and CORBA
RMI | CORBA |
---|
RMI is a Java-specific technology. | CORBA has implementation for many languages. |
It uses Java interface for implementation. | It uses Interface Definition Language (IDL) to separate interface from implementation. |
RMI objects are garbage collected automatically. | CORBA objects are not garbage collected because it is language independent and some languages like C++ does not support garbage collection. |
RMI programs can download new classes from remote JVM's. | CORBA does not support this code sharing mechanism. |
RMI passes objects by remote reference or by value. | CORBA passes objects by reference. |
Java RMI is a server-centric model. | CORBA is a peer-to-peer system. |
RMI uses the Java Remote Method Protocol as its underlying remoting protocol. | CORBA use Internet Inter- ORB Protocol as its underlying remoting protocol. |
The responsibility of locating an object implementation falls on JVM. | The responsibility of locating an object implementation falls on Object Adapter either Basic Object Adapter or Portable Object Adapter. |
Conclusion
In conclusion, RMI and CORBA are good technologies for distributed computing, however use of both technologies are different. As stated earlier, the RMI model is best suited for Java peculiar environments in which the remoting needs to be synchronized and interoperate with other Java based systems where the concept of simplicity reign supreme. On the other hand CORBA is more appropriate for distributed system which are heterogeneous language and platform. Knowing the benefits of one over the other and the limitations of the two shall enable developers make an informed decision on which one fits the projects best.
Similar Reads
Difference Between RMI and DCOM In this article, we will see differences between Remote Method Invocation(RMI) and Distributed Component Object Model(DCOM). Before getting into the differences, let us first understand what each of them actually means. RMI applications offer two separate programs, a server, and a client. There are
2 min read
Difference between CRM and ECRM Now a days internet has changed everything and also the business standards, procedures, management are not out of it. Internet has brought a lot technological change to the business world. In the beginning when CRM was the only way of establishing customer relationship and to take business ahead now
3 min read
Difference between Couchbase and Redis 1. Couchbase : Couchbase Server is an open-source, distributed multi-model NoSQL document-oriented database software package that is optimized for interactive applications. It is also known as Membase. It was developed by Couchbase, Inc. and initially released on August 2010. 2. Redis : Redis stands
2 min read
Difference between CORBA and DCOM In the world of distributed systems, CORBA (Common Object Request Broker Architecture) and DCOM (Distributed Component Object Model) are two significant technologies designed to enable communication between objects in different locations, be it across networks or within different systems. Both have
5 min read
Difference between RDBMS and Couchbase 1. RDBMS : RDBMS stands for Relational Database Management Systems. It is most popular database. In it data is store in the form of row that is in the form of tuple. It contain numbers of table and data can be easily access because data is store in the table. This Model was proposed by E.F. 2. Couch
2 min read
Difference between CouchDB and Redis 1. CouchDB : Apache CouchDB is an open-source document-oriented NoSQL database that uses multiple formats and protocols to store, transfer, and process its data, it uses JSON to store data, JavaScript as its query language using MapReduce, and HTTP for an API. It was developed by Apache Software Fou
2 min read