当前位置:网站首页>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
边栏推荐
- Gossip: talk with your daughter about why you should learn culture lessons well
- Tcp/ip protocol analysis (tcp/ip three handshakes & four waves + OSI & TCP / IP model)
- STM32_ Find the cause of entering hardfault_ Handler's function
- C language pthread_ cleanup_ Push() and pthread_ cleanup_ Pop() function (used for the resource cleaning task after the termination action in the critical resource program segment to avoid deadlock. T
- Routing between VLANs (explanation + verification)
- Flynk de duplication (2) solve the hot issues in the process of flynk and flynk SQL de duplication
- C# 中的转译字符'/b'
- 帮忙发一份招聘,base全国,有兴趣的可以过来看看
- Regular expression foundation sorting
- 【QT】capture. Obj:-1: error: lnk2019: unresolved external symbols__ imp_ Htons (solution)
猜你喜欢

Single arm routing (explanation + experiment)

flink1.14 sql基础语法(一) flink sql表查询详解

C winfrom common function integration-2

STM32_ Find the cause of entering hardfault_ Handler's function
![Multithreading [preliminary - Part 1]](/img/e6/5808bbdb8368bc780bde4c151e7cd7.png)
Multithreading [preliminary - Part 1]

帮忙发一份招聘,base全国,有兴趣的可以过来看看

C common function integration-3

Codeforces Round #810 (Div.2) A-C

Systematic explanation of unit testing: mockito

Tcp/ip protocol analysis (tcp/ip three handshakes & four waves + OSI & TCP / IP model)
随机推荐
Plato farm is expected to further expand its ecosystem through elephant swap
JS regular expression implementation adds a comma to every three digits
Oracle composite query
C语言实现猜数字小游戏项目实战(基于srand函数、rand函数,Switch语句、while循环、if条件判据等)
Record a pit dug by yourself~
[golang learning notes 2.0] arrays and slices in golang
Confluence vulnerability learning - cve-2021-26084/85, cve-2022-26134 vulnerability recurrence
C language implementation of guessing numbers Games project practice (based on srand function, rand function, switch statement, while loop, if condition criterion, etc.)
Prior Attention Enhanced Convolutional Neural Network Based Automatic Segmentation of Organs at Risk
Graylog 日志服务器单节点部署
我是不是被代码给耽误了……不幸沦为一名程序员……
闭散列和开散列解决哈希冲突
Expose Prometheus metrics in Perl programs
Debug:与泛型有关的“无法解析的外部符号”
Gossip: talk with your daughter about why you should learn culture lessons well
「翻译」SAP变式物料的采购如何玩转?看看这篇你就明白了
什么是真正的 HTAP ?(二)挑战篇
Applet payment management - new payment docking process
C common function integration-3
Prior Attention Enhanced Convolutional Neural Network Based Automatic Segmentation of Organs at Risk