Compare the Difference Between Similar Terms

Difference Between

Home / Technology / IT / Applications / Difference Between RPC and RMI

Difference Between RPC and RMI

December 2, 2014 Posted by Admin

RPC vs RMI
 

The basic difference between RPC and RMI is that RPC is a mechanism that enables calling of a procedure on a remote computer while RMI is the implementation of RPC in java. RPC is language neutral but only supports primitive data types to be passed. On the other hand, RMI is limited to Java but allows passing objects. RPC follows traditional procedural language constructs while RMI supports object-oriented design.

What is RPC?

RPC, which stands for Remote Procedure Call, is a type of inter-process communication. This allows calling a function in another process running on the local computer or a remote computer. This concept emerged long time ago in 1980, but the first famous implementation was seen in Unix.

RPC involves several steps. The client does a procedure call on the local computer as usual. The module called client stub collect the arguments and create a message and pass to the operating system, Operating system does a system call and sends this message to the remote computer. Operating system in the server collects the message and passes to the module on the server called server stub. Then server stub calls the procedure on the server. Finally, results are sent back to the client.

The advantage of using RPC is that it is independent on the network details. The programmer just has to specify in an abstract fashion while the operating system will look after the internal network details. So this makes programming easier and lets RPC work across any network despite the physical and protocol differences. RPC implementations are present in all mainstream operating systems such as Unix, Linux, Windows and OS X. RPC is generally language neutral hence it limits the data types to the most primitive ones since they must be common to all languages. The approach in RPC is not object oriented, but it is a traditional procedural mechanism like in C.

Difference Between RPC and RMI

What is RMI?

RMI, which stands for Remote Method Invocation, is an API (Application Programming Interface) that implements RPC in java to support object orientated nature. This allows calling of Java methods on another Java Virtual machine residing on the same computer or a remote one. The limitation of RMI is that only Java methods can be invoked, but this comes with the advantage that objects can be passed as arguments and return values. When performance is considered RMI is slower than RPC due to the involvement of bytecode on the Java Virtual machine, but RMI is very much programmer friendly, and it is very easy to use.

RMI uses inbuilt security mechanisms in Java and also gives a socket factory that enables usage of non-TCP custom transport layer protocols. Moreover, RMI provides methods to bypass firewalls. The steps that occur in RMI is similar to RPC. The implementation of RMI looks after the internal network details where the programmer does not have to worry about them.

What is the difference between RPC and RMI?

• RPC is language neutral while RMI is limited to Java.

• RPC is procedural like in C, but RMI is object oriented.

• RPC supports only primitive data types while RMI allows objects to be passed as arguments and return values. When using RPC, programmer must split any compound objects to primitive data types.

• RMI is easy to program that RPC.

• RMI is slower than RPC since RMI involves execution of java bytecode.

• RMI allows usage of design patterns due to the object oriented nature while RPC does not have this capability.

Summary:

RPC vs RMI

RPC is a language neutral mechanism that allows calling of a procedure on a remote computer. However, the language neutral feature limits the data types that are passed as arguments and return values to primitive types. RMI is the implementation of RPC in Java and it supports object passing as well, making the life of the programmer easier. The advantage of RMI is the object oriented design support, but limitation to Java is a disadvantage.

 

Images Courtesy:

  1. Synchronous versus asynchronous RPC by CAPS entreprise (CC BY-SA 3.0)

Related posts:

Difference Between SOA and Web Services Difference Between Adobe CS4 and Adobe CS5 Difference Between Adobe After Effects and Adobe Premiere Difference Between ppt and pptx in Microsoft PowerPoint Difference Between MPEG4 and H264 and H263

Filed Under: Applications Tagged With: compare RPC and RMI, remote method invocation, remote procedure call, RMI, rmi features, RPC, rpc and rmi, RPC and RMI Differences, rpc features

About the Author: Admin

Coming from Engineering cum Human Resource Development background, has over 10 years experience in content developmet and management.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Request Article

Featured Posts

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and SARS

Difference Between Coronavirus and SARS

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Covid 19

Difference Between Coronavirus and Covid 19

You May Like

Difference Between PhD and PsyD

Difference Between PhD and PsyD

Difference Between Agglutination and Coagulation

Difference Between India and England

Difference Between Tailor and Seamstress

Difference Between Spring and Hibernate

Difference Between Spring and Hibernate

Latest Posts

  • What is the Difference Between Confidence and Cockiness
  • What is the Difference Between Retinoschisis and Retinal Detachment
  • What is the Difference Between Shin Splint and Stress Fracture
  • What is the Difference Between Hypopituitarism and Panhypopituitarism
  • What is the Difference Between Flat White and Cortado
  • What is the Difference Between Tack Coat and Prime Coat
  • Home
  • Vacancies
  • About
  • Request Article
  • Contact Us

Copyright © 2010-2018 Difference Between. All rights reserved. Terms of Use and Privacy Policy: Legal.