当前位置:网站首页>RPC remote procedure call
RPC remote procedure call
2022-07-27 07:40:00 【Ziye cotyledon】
RPC brief introduction
RPC, English full name : Remote Procedure Call. Chinese name : Remote procedure call , It is a computer communication protocol . With the help of RPC You can call remote services as if they were local services . For example, two servers, order server and commodity server , The order server needs to call the method of product details , Because the two applications are not in the same memory space , Can't call directly , Therefore, it is necessary to express the semantics of the call and convey the data of the call through the network . It should be noted that RPC Not specific technology , It refers to the process of remote call of the whole network

RPC Four core components
Client( client ), The caller of the service .
Client Stub( Client stub ), Store the address message of the server , Then package the request parameters of the client into network messages , And then send it to the server remotely through the network .
Server( Server side ), The real provider of services .
Server Stub( Server stub ), Receive messages from clients , Send message to Jaguar , And call local methods .
- client (client) In local call mode ( That is, in the way of interface ) Call the service ;
- Client stub (client stub) After receiving the call , Be responsible for putting methods 、 The parameters are assembled into a message body capable of network transmission
( Serialize the message body object to binary ); - Client pass socket Send the message to the server ;
- Server stub ( server stub) Decode the message upon receipt ( Deserialize message object );
- Server stub ( server stub) The local service is invoked based on the decoding results ;
- Service handling ( Business processing )
- The local service executes and returns the result to the server stub ( server stub);
- Server stub ( server stub) Package the returned results into messages ( Serialize result message object );
- Server side (server) adopt socket Send a message to the client ;
- Client stub (client stub) Received result message , And decode it ( Serialize the result message );
- client (client) Get the final result .
RPC The goal is to 2,3,4,5,7,8,9,10 These steps are encapsulated , only 1,6,11
Duboo,Feign,gRPC All belong to RPC frame
Other chapters -> Jump
end
边栏推荐
- A small cotton padded jacket with air leakage
- Actual combat of flutter - Request encapsulation (I)
- 国内首款开源MySQL原生HTAP数据库即将发布!三大亮点抢先看,限量周边等你来~
- 帮忙发一份招聘,base全国,有兴趣的可以过来看看
- Plato Farm有望通过Elephant Swap,进一步向外拓展生态
- Confluence vulnerability learning - cve-2021-26084/85, cve-2022-26134 vulnerability recurrence
- Temperature and humidity measurement and display device based on Arduino
- opengl-shader学习笔记:varying变量
- 闭散列和开散列解决哈希冲突
- Zabbix: map collected values to readable statements
猜你喜欢

Use of tigervnc

An open source OA office automation system

Tcp/ip protocol analysis (tcp/ip three handshakes & four waves + OSI & TCP / IP model)

杂谈:跟女儿聊为啥要学好文化课

「翻译」SAP变式物料的采购如何玩转?看看这篇你就明白了

Chapter 6 Shell Logic and Arithmetic

C language programming | program compilation and preprocessing

Panabit SNMP配置

【小程序】如何获取微信小程序代码上传密钥?

安装tensorflow
随机推荐
杂谈:最近好多朋友谈出国……
安装tensorflow
Flink1.14 SQL basic syntax (I) detailed explanation of Flink SQL table query
flink1.14 sql基础语法(一) flink sql表查询详解
冰冰学习笔记:类与对象(中)
UUID and secrets module
Synchronized lock
Gossip: Recently, many friends talk about going abroad
Installation and use of apifox
如何在电脑端登陆多个微信
Temperature and humidity measurement and display device based on Arduino
ARP广播实践案例
Plato Farm有望通过Elephant Swap,进一步向外拓展生态
Zabbix: map collected values to readable statements
杂谈:跟女儿聊为啥要学好文化课
Multi condition query of when
Am I delayed by the code... Unfortunately, I became a programmer
正则表达式基础整理
Drconv pytorch is changed to the same size of output and input
The DrawImage method calls the solution of not displaying pictures for the first time