当前位置:网站首页>RPC typical framework

RPC typical framework

2022-06-25 11:21:00 pyiran

RPC(Remote Procedure Communication,RPC) It is a common Distributed Network communication protocol , Across the transport and application layers , Making users call a remote function is like calling a local function , Users do not need to care about the details of network communication , It simplifies the development cost of users . Typical applications include Hadoop.

RPC It is generally used that Client&Server Model , A typical RPC The framework includes :
Communication module : Implement request response protocol on server and client . It is generally divided into two implementation modes: synchronous and asynchronous .

Stub Program : Both the server and the client contain Stub Program , As an agent . On the client side , When a user calls a remote function, it is the same as when making a local call , But the request will be sent to the server through the network , Besides , After the client receives the response from the server , She also interprets it . And on the server side , It is responsible for receiving and decoding the parameters transmitted by the user , Call the corresponding service and return the encoded response to .

The scheduler : Receive the request message from the communication module and select one Stub The program handles it . When the request is large , Will use the thread pool to .

Client procedure / Service process : The sender of the request and the handler of the request .

RPC The client and server of

原网站

版权声明
本文为[pyiran]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202200540010244.html