当前位置:网站首页>RPC details
RPC details
2022-04-22 22:50:00 【Know what you know】
RPC Call categories
- A synchronous invocation : The client waits for the server to complete the call and return the result
- Asynchronous call : The client does not have to wait for the execution result to return , However, the return result can still be obtained through callback notification and other methods , If the client does not the relationship, the call returns the result , Becomes a one-way asynchronous call , One way calls do not return results .
RPC Structural dismantling

- RPC The service provider passes RpcServer To export (export) Remote interface method .
- By the client RpcClient To introduce (import) Remote interface method .
- The client calls the remote interface method just like the local method ,RPC Proxy implementation of interface provided by framework , The actual call is delegated to the agent RpcProxy .
- The agent encapsulates the call information and passes the call to RpcInvoker To actually execute .
- On the client side RpcInvoker Through connector RpcConnector To maintain the channel with the server RpcChannel, And use RpcProtocol Execute protocol code (encode) And send the encoded request message to the server through the channel .
- RPC Server receiver RpcAcceptor Receive call requests from clients , Also use RpcProtocol Perform protocol decoding (decode).
- The decoded call information is passed to RpcProcessor To control the processing of the call process
- Finally, delegate the call to RpcInvoker To actually execute and return the call result .
RPC Component responsibilities
- RpcServer: Responsible for exporting (export) Remote interface
- RpcClient: Responsible for importing (import) Proxy implementation of remote interface
- RpcProxy: Proxy implementation of remote interface
- RpcInvoker: The client realizes ( Responsible for encoding the call information and sending the call request to the service side and waiting for the call result to return ); The service side realizes ( Responsible for calling the specific implementation of the server interface and returning the call result )
- RpcProtocol: Be responsible for the compilation of the agreement / decode
- RpcConnector: Responsible for maintaining the connection channel between the client and the service side and sending data to the service side
- RpcAcceptor: Responsible for receiving the client's request and returning the request result
- RpcProcessor: Responsible for controlling the calling process at the service side , Include management call thread pool 、 Timeout time, etc
- RpcChannel: Data transmission channel
版权声明
本文为[Know what you know]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204222218563047.html
边栏推荐
猜你喜欢

External interrupt ------------ stm32f407zet6

讲座录播|图数据库中的子图匹配算法-邹磊

A journey to C by Xiao Sai Mao -- first understanding of C language (3)

Advanced multithreading (8) -- thread pool

RPC详解
![[MRCTF2020]Ez_bypass](/img/11/6278377c6273eca16716bc73c8a63b.png)
[MRCTF2020]Ez_bypass

Llvm learning (I) - getting to know llvm

吴恩达-深度学习微课-第四课

scanpy find resolution

Steps to build appinventor2 on the window
随机推荐
【洛谷】P1162 填涂颜色(bfs)
51 MCU proteus simulation key control nixie tube digital display
二分法应用:875. 爱吃香蕉的珂珂
Knowledge map opening notes
3. 源码
Implementation of multi-layer perceptron from scratch (extracting function from D2L package)
交换机的接口有哪些?一文带你记住其名称及作用
CVPR 2022:微笑识别也带性别歧视?浙大武大联合蚂蚁Adobe搞了个公平性提升框架
[MRCTF2020]Ez_bypass
防ddos攻击转发IP,棋牌游戏高防IP好用吗?
GBase 8s V8. 8 SQL Guide: Tutorial - 6.2.1 (3)
GBase 8s V8. 8 SQL Guide: Tutorial - 6.2.1 (2)
未来可期,PlatoFarm的生态通证登录Bitmart等全球四大平台
Enter a line of characters, separated by a space between words, and count how many words there are
repeat_dijkstra
每日CISSP认证常错题(2022年4月22日)
Advanced multithreading (8) -- thread pool
LLVM 学习(一) -初识LLVM
给复杂的数组结构数据换key
scanpy find resolution