📜  RPC 和 RMI 的区别

📅  最后修改于: 2021-09-11 03:37:55             🧑  作者: Mango

RPC代表支持过程编程的远程过程调用。 Tt 几乎就像 IPC 机制,只要软件允许进程管理共享信息,就与环境相关联,只要完全不同的进程在不同的系统上执行单元死刑,并且本质上需要基于消息的通信。

上图显示了PRC实施的工作步骤。

RMI代表远程方法调用,类似于PRC,但它支持面向对象的编程,这是java的特性。线程可以决定对异物的策略。在 RMI 中,对象作为参数而不是普通数据传递。

此图显示了 RMI 协议的客户端-服务器架构。

RPC 和 RMI 相似,但 RPC 和 RMI 的基本区别在于 RPC 支持过程式编程,而 RMI 支持面向对象编程。

来看看RPC和RMI的区别:

S.NO RPC RMI
1. RPC is a library and OS dependent platform. Whereas it is a java platform.
2. RPC supports procedural programming. RMI supports object oriented programming.
3. RPC is less efficient in comparison of RMI. While RMI is more efficient than RPC.
4. RPC creates more overhead. While it creates less overhead than RPC.
5. The parameters which are passed in RPC are ordinary or normal data. While in RMI, objects are passed as parameter.
6. RPC is the older version of RMI. While it is the successor version of RPC.
7. There is high Provision of ease of programming in RPC. While there is low Provision of ease of programming in RMI.
8. RPC does not provide any security. While it provides client level security.
9. It’s development cost is huge. While it’s development cost is fair or reasonable.
10. There is a huge problem of versioning in RPC. While there is possible versioning using RDMI.
11. There is multiple codes are needed for simple application in RPC. While there is multiple codes are not needed for simple application in RMI.