In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what is the structure and process of Web RPC". Interested friends may wish to take a look at it. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what is the structure and process of Web RPC"?
Structure flow chart of RPC
1. Caller (client) initiates the call in the way of local call
2. After receiving the call, Client stub (client stub, which can be understood as an auxiliary helper) is responsible for packaging the called method name, parameters, etc., and coding them into a message body in a specific format that can be transmitted over the network.
3. Client stub sends the message body to the peer (server) through the network
4. Server stub (server stub, which can also be understood as an auxiliary assistant) after receiving the message through the network, unpack and decode according to the corresponding format to obtain the method name and parameters.
5. Server stub makes local calls based on method name and parameters
6. The local call of the callee (Callee, also known as Server) will return the result to server stub after execution
7. Server stub packages and encodes the return value into a message and sends it to the peer (client) over the network
8. After receiving the message, Client stub unpacks and decodes it and returns it to Client
9. Client gets the final result of this RPC call.
The above 1-9 is the whole communication structure flow of RPC, and in order to make the whole communication process transparent and easy to use, RPC encapsulates the 2-8 process, and we are done.
What else?
After understanding the RPC process, in order to implement RPC, we need to focus on two more points:
Message protocol
The parameters called by the client and the return value of the server how the data transmitted on the network are packaged, encoded, unpacked and decoded.
We can use the HTTP protocol on the format of the message (thus programming HTTP communication), or we can define a format that both the client and the server follow.
Transmission control
How to realize the control of data sending and receiving in the network.
At this point, I believe you have a deeper understanding of "what is the structure and process of Web RPC". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.