Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
340 views
in Technique[技术] by (71.8m points)

What is the difference between RPC and RMI?

Currently reading about RPC and RMI, I'm a bit confused about the difference.

When implementing RMI and for example gRPC, the syntax is basically the same.

They both have interfaces determining methods parameters and response.

They can both send objects in parameters (Java RMI doing it natively, C# gRPC with proto).

They both execute the request to the server through a method call on some object (based on the interface.

So what is the difference? Is it how the processes of data transfer happen between client and server?

By the looks of it RMI is just a Java implementation of RPC and gRPC is the C# implementation.

question from:https://stackoverflow.com/questions/65646238/what-is-the-difference-between-rpc-and-rmi

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

RPC stands for Remote Procedure Call which supports procedural programming. Tt’s almost like IPC mechanism wherever the software permits the processes to manage shared information Associated with an environment wherever completely different processes area unit death penalty on separate systems and essentially need message-based communication. rpc

The above diagram shows the working steps in PRC implementation.

RMI stands for Remote Method Invocation, is a similar to PRC but it supports object-oriented programming which is the java’s feature. A thread is allowable to decision the strategy on a foreign object. In RMI, objects are passed as a parameter rather than ordinary data.

rmi

This diagram shows the client-server architecture of the RMI protocol.

RPC and RMI both are similar but the basic difference between RPC and RMI is that RPC supports procedural programming, on the other hand, RMI supports object-oriented programming.

Let’s see that the difference between RPC and RMI:

rmi vs rpc


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...