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. cocos2dx 3.0 学习笔记 引用cocostudio库 的环境配置

    cocostudio创建UI并应用时须要引用cocostudio库,须要额外的环境配置: 之前已经搭配好了基础的开发环境,包含 1) JDK 2) Python 2.7 3) ant 4) visua ...

  2. Gray Code -- LeetCode

    原标题链接: http://oj.leetcode.com/problems/gray-code/  这道题要求求出n位的格雷码相应的二进制数,主要在于找到一种格雷码的递增方法(格雷码并非唯一的,能够 ...

  3. 玩转Web之Jsp(三)-----Jsp+SQLServer 用sql语句实现分页

    在BBS的实现里,jsp与sqlserver 结合的操作中,怎样实现分页,使每页显示根帖的名字,并按发表时间降序排列? 在这里举例说明,page_size为每页显示的条数,pageNo为当前页数,st ...

  4. JVM内存结构、垃圾回收那点事(转)

    翻看电脑的文件夹,无意看到了9月份在公司做的一次分享,浏览了一下"婆婆特",发现自己在ppt上的写的引导性问题自己也不能确切的回答出来,哎,知识这东西,平时不常用的没些日子就生疏了 ...

  5. MongoDB CRUD 基础知识

    建立一个良好的发展环境 环境win8 x64,下载并安装省略.经mongodb 的bin文件夹增加windows的path中,为以后使用方便. c盘新建存储目录:c:/data/db 执行服务:WIN ...

  6. Android 儿子Activity在启动过程中的流程组件 && 儿子Activity在一个新的进程组件启动过程

    1.儿子Activity在启动过程中的流程组件 在Android Activity启动过程http://blog.csdn.net/jltxgcy/article/details/35984557一文 ...

  7. ubuntu-14.04 系统安装mysql-5.6.21

    1.安装mysql前准备工作  (1).从官网下载mysql-5.6.21.tar.gz  (2).tar -zxvf mysql-5.6.21-tar.gz  会生成mysql-5.6.21的目录 ...

  8. WPF学习(12)动画

    本篇来学习WPF的动画.什么是动画?动画就是一系列帧.在WPF中,动画就是在一段时间内修改依赖属性值的行为,它是基于时间线Timeline的.有人会说,要动画干嘛,华而不实,而且添加了额外的资源消耗而 ...

  9. 例如找出令人信服的权威C++中间malloc与new

    例如找出令人信服的权威C++中间malloc与new 问题: 非常多人都知道malloc与new都是用来申请空间用的,开辟空间来源于堆中. 可是在C++中却非常少用malloc去申请空间,为什么? 以 ...

  10. Cocos2d-x 脚本语言Lua使用

    Cocos2d-x 脚本语言Lua使用 前面几篇博客已经把Lua的相关基础知识介绍了.本篇博客就来介绍一下,怎样在Cocos2d-x项目中使用Lua这门脚本语言进行开发.因为笔者使用的时Mac系统.所 ...