rpc远程过程调用_什么是远程过程调用(RPC)?

rpc远程过程调用_什么是远程过程调用(RPC)?

rpc远程过程调用

Remote Procedure Call (RPC) is a protocol or architecture which is used to run programmes and code located another system in a computer network. Normally processes can call each other in the same local systems. RPC is used to call other processes on the remote systems like a local system.

远程过程调用(RPC)是一种协议或体系结构,用于运行位于计算机网络中另一个系统上的程序和代码。 通常,进程可以在相同的本地系统中相互调用。 RPC用于调用远程系统(如本地系统)上的其他进程。

分散式 (Distributed)

RPC architecture is distributed where we can run single applications in multiple systems in a synchronized way. We can use all of the system resources of the multiple systems as a single big system.

RPC体系结构是分布式的,我们可以在其中以同步方式在多个系统中运行单个应用程序。 我们可以将多个系统的所有系统资源用作一个大系统。

基于客户端服务器 (Client-Server Based)

RPC uses the client-server model. The requesting program is called a client and service providing program or system is called server. Client and server are interchangeable according to the requesting and responding system.

RPC使用客户端-服务器模型。 请求程序称为客户端,服务提供程序或系统称为服务器。 客户端和服务器可以根据请求和响应系统互换。

封送处理 (Marshaling)

In order to call procedure or function on the remote system program, we need to provide some data like function name, parameters, program data etc. In order to provide these data, a stub is included in compiled code as representative of the remote procedure code. When Stub will interface as a remote procedure call and manage transmission of the data, function, parameters etc to the remote procedure.

为了在远程系统程序上调用过程或函数,我们需要提供一些数据,例如函数名称,参数,程序数据等。为了提供这些数据,已编译的代码中包含存根以代表远程过程代码。 。 当Stub将作为远程过程调用进行接口并管理数据,函数,参数等到远程过程的传输时。

请求-回复 (Request-Reply)

As a client-server architecture RPC is a request and reply protocol which can be named as ping-pong. This is not an obligation for RCP applications but most of the RPC applications send single request/procedure call and waits for the response. Without getting a response they do not send a second request/procedure call.

作为客户端-服务器体系结构,RPC是一种请求和应答协议,可以将其命名为ping-pong 。 这不是RCP应用程序的义务,但是大多数RPC应用程序发送单个请求/过程调用并等待响应。 没有得到回应,他们不会发送第二个请求/过程调用。

UDP和TCP传输 (UDP and TCP Transport)

RPC can operate over UDP or TCP without any restriction. But in general, UDP is preferred by the RCP applications which provide faster and simples implementation. RCP/RCP s slower but provides reliable transmission if we need stability or the network is not stable as expected.

RPC可以不受限制地通过UDP或TCP运行。 但是总的来说,UDP是RCP应用程序首选的,它提供了更快,更简单的实现。 RCP / RCP速度较慢,但​​如果我们需要稳定性或网络不稳定,则可以提供可靠的传输。

了解更多什么是计算机域和域名定义?

标准化数据表示 (Standardized Data Representation)

RPC marshals the data to make a procedure call with a function name, parameter, and data. The marshaled data will be structured as an eXternal Data Representation (XDR) protocol which is documented in RFC 1832. The XDR format supports data types like integers, floating point numbers, strings, and different types to enhance data transmission seamlessly.

RPC封送数据以使用函数名称,参数和数据进行过程调用。 封送处理后的数据将构造为RFC 1832中记录的外部数据表示(XDR)协议。XDR格式支持整数,浮点数,字符串和不同类型之类的数据类型,以无缝增强数据传输。

认证方式 (Authentication)

RPC also supports authentication the calling applications one system to the target function on the other system. Authentication can run in several models. As an example, NFS operations authentication is done with the Linux user and group IDs for file server permission and authorization.

RPC还支持将一个系统中的调用应用程序验证到另一系统上的目标功能。 身份验证可以在多种模型中运行。 例如,NFS操作身份验证是通过Linux用户和组ID进行的,用于文件服务器的权限和授权。

工作流程 (Work Flow)

In this part, we will examine a standard RPC request for different components on the client and server system.

在这一部分中,我们将检查客户端和服务器系统上不同组件的标准RPC请求。

  • Client program or applications call the client function.

    客户端程序或应用程序调用客户端功能。
  • Client function call redirected to the Client stab which is responsible to make the remote procedure call.

    客户端函数调用重定向到Client stab,后者负责进行远程过程调用。
  • Client stub will use ready to use RPC Runtime as an interface to the server

    客户端存根将准备使用RPC运行时作为服务器的接口
  • Client RPC Runtime will redirect message to the server RPC runtime.

    客户端RPC运行时会将消息重定向到服务器RPC运行时。
  • Server RPC Runtime will popup the client message to the Server Stub.

    服务器RPC运行时会将客户端消息弹出到服务器存根。
  • Server Stub will call the Server function in order to execute the given method, parameters, and data requested by the client.

    服务器存根将调用服务器功能,以执行客户端请求的给定方法,参数和数据。
  • After the Server Function execution ended function result will be returned to the Server Stub

    服务器功能执行结束后,功能结果将返回到服务器存根
  • Server Stub will redirect to the RPC Runtime as response

    服务器存根将重定向到RPC运行时作为响应
  • Server RPC Runtime will transmission result  to the Client RPC Runtime

    服务器RPC运行时会将结果传输到客户端RPC运行时
  • RPC Runtime will popup to the Client Stub

    RPC运行时将弹出到客户端存根
  • Client Stub will push the method call result to the Client Function.

    Client Stub会将方法调用结果推送到Client Function。
在C编程中了解更多结构
rpc远程过程调用_什么是远程过程调用(RPC)?
Work Flow
工作流程

RPC的优势(RPC Advantages)

Here we will list some advantages of the RPC.

在这里,我们将列出RPC的一些优点。

  • Remote procedure calls can use process oriented and thread oriented models

    远程过程调用可以使用面向过程和面向线程的模型
  • RPC provides an abstraction for running remote methods and procedures with simplicity

    RPC提供了一种简化运行远程方法和过程的抽象方法
  • Code development efforts will be minimum with RPC

    使用RPC的代码开发工作将最少
  • RPC can be used in a distributed manner as well as local systems

    RPC可以以分布式方式以及本地系统使用
  • RPC performance is good according to other alternative protocols

    根据其他替代协议,RPC性能良好

RPC的缺点(RPC Disadvantages)

Here we will list some disadvantages of the RPC.

在这里,我们将列出RPC的一些缺点。

  • Some RPC implementations are standard

    一些RPC实现是标准的
  • There is an increase in the cost of a remote procedure call

    远程过程调用的成本增加了

翻译自: https://www.poftut.com/what-is-remote-procedure-call-rpc/

rpc远程过程调用