Difference Between RMI and DCOM


Both RMI and DCOM are the technologies that serve to enable distributed object computing. The RMI is a Java-based technology, DCOM, on the other hand, is developed by Microsoft. Although they are built for the same purpose by two technical market giants, there exist some significant differences in terms of design, implementation and usage. We are going to compare and list some differences between RMI and DCOM in this article.

RMI vs DCOM

Distributed Objects

To understand the differences between RMI and DCOM, it is necessary to understand distributed object computing as both terms come under the same umbrella. When we connect a collection of autonomous computers using a computer network equipped with distributed system software, it is termed a distributed system. The computers of this system may be located at different locations, however, the user will experience a single, integrated computing facility.

The term distributed object computing refers to a technique of distributed system in which objects are distributed across a heterogeneous network. It extends an object-oriented programming system.

RMI

It is an abbreviation that stands for Remote Method Invocation. It is a Java based technology used to build distributed applications by allowing an object running in one Java virtual machine to invoke methods on an object running in another JVM. We can communicate and share data across different machines.

RMI uses a client-server architecture, where the client is the application that invokes remote methods and the server is the application that provides the implementation of those methods. The client and server can be located on the same machine or on different machines connected by a network.

It consists of three layers

  • Stub/skeleton layer: A stub is a proxy object on the client side that represents the remote object on the server side. A skeleton is a helper object on the server side that receives requests from the stub and invokes methods on the remote object.

  • Remote reference layer: It handles the creation, deletion and management of references to remote objects.

  • Transport layer: It provides the low-level communication mechanism between the client and the server.

DCOM

It stands for Distributed Component Object Model that supports language-independent communication. Its underlying protocol is Object Remote Procedure Call (ORPC). One application can remotely launch and invoke the methods of a DCOM server object by using ORPC on a different system. It is heavily used on the Windows platforms only because of COM service.

DCOM is actually a distributed version of 'COM on the wire' technology. This COM specification works at the binary level to allow a DCOM server component to be written in multiple programming languages like C++, Java, Object Pascal, Visual Basic and COBOL. These components can be implemented on any platform that supports COM services.

DCOM server objects provide support for multiple interfaces and each object implements an interface called IUnknown, which provides basic functionality such as reference counting and querying for other interfaces.

Difference between RMI and DCOM

From the above discussion, we can conclude the following differences between RMI and DCOM:

RMI DCOM
It cannot work with any other programming language other than Java. It can work with C++, Java, Object Pascal, Visual Basic and COBOL.
RMI uses Java Remote Method Protocol (JRMP). DCOM uses Object Remote Procedure Call (ORPC).
Due to Java Virtual Machine, it can support multiple Platforms. Due to COM specification, it only supports the Windows Platform.
The mapping of the object name to its implementation is handled by the RMI Registry. The mapping of the object name to its implementation is handled by Windows Registry.
Object references are used for object identification at run-time. In this case, Interface Pointer is used.
The client side is called a stub, and the server side is called a skeleton. The client stub is called a proxy, and the server side is called a stub.

Conclusion

Distributed Object Technologies are getting more popular day by day as they facilitate telecommunication, network applications, real-time process control like aircraft control systems, and many more. This article has shown a comparative analysis of two of the most popular Distributed Object Technologies named DCOM and RMI.

Updated on: 19-Jul-2023

120 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements