Differences between RPC and RMI (difference between RPC and RMI)

Source: Internet
Author: User

Differences between RPC and RMI (difference between RPC and RMI)

RPC vs RMI

RPC (remote Procedure call) and RMI (remote Method invocation) is the user to invoke or cal of mechanisms L processes that would run on a different computer from the one of the user is using. The main difference between the approach or paradigm used. RMI uses an object oriented paradigm where the user needs to know the object and the method of the object he needs to Invo Ke. In comparison, RPC isn ' t an object oriented and doesn ' t deal with objects. Rather, it calls specific subroutines that is already established.

RPC (Remote Procedure Call) and RMI (remote method call) are two mechanisms (also known as specifications, protocols) that enable users to invoke methods on different computers from a single computer. The main difference is that they are used or called paradigms, and RMI uses an object-oriented paradigm, which means that the user needs to know the methods in the objects and objects that he calls, and that RPC is not object-oriented and cannot handle objects, but rather calls specific subroutines.

RPC is a relatively old protocol, which is based on the C language, and thus inheriting its paradigm. With RPC, you get a procedure call, the looks pretty much like a local call. RPC handles the complexities involved with passing the-from the local to the remote computer. RMI does the very same thing; Handling the complexities of passing along the invocation from the local to the remote computer. But instead of passing a procedural call, RMI passes a reference to the object and the method are being called. RMI is developed by Java and uses it virtual machine. It is therefore exclusive to Java applications for calling methods on remote computers.

RPC is a relatively old C-based protocol, so it inherits the C paradigm, using RPC, you can invoke a remote method like a local method, the complex operation of calling the procedure by RPC, the functions of RMI and RPC are basically the same. But unlike RPC, which transmits only one procedure call, RMI needs to transfer the object's reference and the method it calls. RMI is developed in Java and runs on a Java virtual machine, so its purpose is to invoke a Java application on a remote computer.

In the end, RPC and RMI is just, means of achieving the same exact thing. It all comes the language you is using and which paradigm you is used to. Using The object oriented RMI is the better approach between the both, especially with larger programs as it provides a CLE Aner code, easier, once something goes wrong. Use of RPC is still widely accepted, especially if any of the alternative remote procedural protocols option.

Finally, RPC and RMI are just different ways of dealing with the same problem, all due to the language you use and the paradigm you use. Using object-oriented RMI is a better approach between the two, especially for large programs that use RMI code to be more concise and easier to track bugs. RPC is still widely accepted, especially when no alternative remote program protocol can be selected.

Summary:

1.RMI is object oriented while RPC isn ' t2.RPC was C bases while RMI are Java only3.RMI invokes methods while RPC Invokes functions4.RPC is antiquated while RMI are the future

Summarize:

1. RMI is object-oriented, and RPC is not

2, RPC is based on the C language, and RMI is only Java-based

3. RMI calls the method, and the RPC call function

4, RPC is outdated, and RMI is the future

Original address: difference between RPC and RMI | difference between | RPC vs RMI http://www.differencebetween.net/technology/protocols-formats/difference-between-rpc-and-rmi/# Ixzz47opxuhev

Blog

Differences between RPC and RMI (difference between RPC and RMI)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.