RPC和RMI的区别(Difference Between RPC and RMI)

RPC vs RMI

  RPC (Remote Procedure Call) and RMI (Remote Method Invocation) are two mechanisms that allow the user to invoke or call processes that will run on a different computer from the one the user is using. The main difference between the two is 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 invoke. In comparison, RPC isn’t object oriented and doesn’t deal with objects. Rather, it calls specific subroutines that are already established.

  RPC(远程过程调用)和RMI(远程方法调用)是两种可以让用户从一台电脑调用不同电脑上面的方法的的机制(也可以称作规范、协议)。两者的主要不同是他们的使用方式或者称作范式,RMI使用面向对象的范式,也就是用户需要知道他调用的对象和对象中的方法;RPC不是面向对象也不能处理对象,而是调用具体的子程序。

  RPC is a relatively old protocol that is based on the C language, thus inheriting its paradigm. With RPC, you get a procedure call that looks pretty much like a local call. RPC handles the complexities involved with passing the call 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 that is being called. RMI was developed by Java and uses its virtual machine. Its use is therefore exclusive to Java applications for calling methods on remote computers.

  RPC是一个基于C语言的相对较旧的协议,因此也就继承了C语言的范式,使用RPC,你可以像调用一个本地方法一样调用远程的方法,由RPC处理调用过程的复杂操作,RMI的功能和RPC基本一样。但是和RPC只传输一个过程调用不同,RMI需要传输对象的引用以及调用的方法。RMI是用Java开发的,运行在Java虚拟机上,因此它的用途是调用远程计算机上的java应用程序。

  In the end, RPC and RMI are just two means of achieving the same exact thing. It all comes down to what language you are using and which paradigm you are used to. Using the object oriented RMI is the better approach between the two, especially with larger programs as it provides a cleaner code that is easier to track down once something goes wrong. Use of RPC is still widely accepted, especially when any of the alternative remote procedural protocols are not an option.

  最后,RPC和RMI只是处理同一个问题的不同方式,这一切都归结于你所使用的语言和你所使用的范式。使用面向对象的RMI是两者之间的更好的方法,特别是大型程序,使用RMI代码更简洁,更容易追踪bug。RPC目前依然是被广泛接受的,尤其是当无法选择任何的可替代的远程程序协议时候。

Summary:

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

总结:

1、RMI是面向对象的,而RPC不是

2、RPC是基于C语言的,而RMI是仅仅基于Java的

3、RMI调用方法,而RPC调用函数

4、RPC是过时的,而RMI是未来

原文地址: Difference Between RPC and RMI | Difference Between | RPC vs RMI http://www.differencebetween.net/technology/protocols-formats/difference-between-rpc-and-rmi/#ixzz47OPXuhEv

RPC和RMI的区别(Difference Between RPC and RMI)的更多相关文章

  1. SOA,Webservice,SOAP,REST,RPC,RMI的区别与联系

    SOA,Webservice,SOAP,REST,RPC,RMI的区别与联系 SOA面向服务的软件架构(Service Oriented Architecture) 是一种计算机软件的设计模式,主要应 ...

  2. RPC与RMI的区别

    分布式项目按照以下发展经历了以下技术: CORBA: RMI:基于远程接口的调用 RMI-RROP:这是RMI与CORBA的结合,用在了EJB技术上,EJB留给世界上是优秀的理论和糟糕的架构. WEB ...

  3. RPC框架-RMI、RPC和CORBA的区别

    关键词:RMI RPC CORBA简 介:本篇文章重点阐述RMI,附带介绍RPC和CORBA Java远程方法调用(Java RMI)是一组实现了远程方法调用(rmi)的API. java RMI是远 ...

  4. RPC的解释以及RPC和Restful、RPC和RMI的区别

    如何科学的解释RPC 说起RPC,就不能不提到分布式,这个促使RPC诞生的领域. 假设你有一个计算器接口,Calculator,以及它的实现类CalculatorImpl,那么在系统还是单体应用时,你 ...

  5. RPC和WebService的区别

    最近分析的这个系统,逻辑架构中有一层是RPC interface.之前对RPC不熟悉,就上网搜索了一下资料,在此总结一下: RPC是Remote Procedure Calling,远程过程调用的缩写 ...

  6. RPC接口测试(二) RPC 与HTTP的区别

    RPC 与HTTP的相同点 两种风格的API区别,总结一下其实非常简单: 1,RPC面向过程,只发送 GET 和 POST 请求.GET用来查询信息,其他情况下一律用POST.请求参数是动词,直接描述 ...

  7. Linux中LPC、RPC、IPC的区别

    其实这玩意儿就是纸老虎,将英文缩写翻译为中文就明白一半了. IPC:(Inter Process Communication )跨进程通信 这个概念泛指进程之间任何形式的通信行为,是个可以拿来到处套的 ...

  8. RPC接口测试(一)什么是 RPC 框架

    什么是 RPC 框架 RPC 框架----- 远程过程调用协议RPC(Remote Procedure Call Protocol)-----允许像调用本地服务一样调用远程服务. RPC是指远程过程调 ...

  9. RPC服务治理框架(一)RPC技术

    一.RPC是什么 remote procedure call:远程过程调用 过程就是程序,像调用本地方法一样调用远程的过程 RPC采用Client-Server结构,通过request-respons ...

随机推荐

  1. Linux的proc文件系统

    proc,用户空间和内核空间能够通过该接口通信, 与普通文件不同的是.这些虚拟文件的内容都是动态创建的. proc文件系统是一个伪文件系统,它仅仅存在内存其中,而不占用外存空间. 它以文件系统的方式为 ...

  2. iOS_18_开关控制器_NavigationController_push道路_数据传输

    最后效果图: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcHJlX2VtaW5lbnQ=/font/5a6L5L2T/fontsize/400/fill ...

  3. FTP上传文件时 System.Net.WebException: 基础连接已经关闭: 接收时发生错误。

    在c#中使用HttpWebRequest时,频繁请求一个网址时,过段时间就会出现“基础连接已经关闭: 接收时发生意外错误”的错误提示.将webRequest的属性设置成下面的,经测试可以解决.Syst ...

  4. 学校oj平台上不去

    学校oj平台上不去,我的作业咋办啊

  5. RH033读书笔记(15)-Lab 16 The Linux Filesystem

    Lab 16 The Linux Filesystem Goal: Develop a better understanding of Linux filesystem essentials incl ...

  6. OnWndMsg处理功能

    于MFC于, OnWndMsg功能,如以下处理步骤: 1)首先.被推断消息有一个消息响应函数.例如OnLButtonDown()处理"左新闻"新闻. 2)数.这里以MFC 的pro ...

  7. 使用WebBrowser,内存一直增加的解决办法

    -- in class definition [DllImport("KERNEL32.DLL", EntryPoint = "SetProcessWorkingSetS ...

  8. Swift伟大的编程语言数据采集

    Swift 2048 https://github.com/austinzheng/swift-2048 苹果官方Swift文档<The Swift Programming Language&g ...

  9. Linux在什么样的从脚本文件数据库sh格式改变sql格式

    在软件开发过程中,经常参与Linux从下一个脚本文件数据库sh格式改变sql格式问题.在本文中,一个实际的脚本文件,例如.描述格式转换过程.        1. sh文件内容 本文中的文件名称为exa ...

  10. MemoryBarrier,Volatile

    使用MemoryBarrier,Volatile进行同步 上一节介绍了使用信号量进行同步,本节主要介绍一些非阻塞同步的方法.本节主要介绍MemoryBarrier,volatile,Interlock ...