当前位置:网站首页>RPC procedure
RPC procedure
2022-04-23 08:23:00 【weixin_ forty-six million two hundred and seventy-two thousand 】
This paper belongs to 【 Tamp Dubbo】 Series articles , The series is designed to use easy to understand language , Take you to know and learn Dubbo technology , Hope to bring some dry goods to the readers . The catalogue of the series is as follows ( Maybe as the writing goes on , Will make some adjustments ):
【 Tamp Dubbo】 What is? RPC frame ?
【 Tamp Dubbo】Dubbo The core feature of
【 Tamp Dubbo】Dubbo The architecture and zookeeper Registration center construction and configuration
【 Tamp Dubbo】Dubbo and Spring Boot Integration to complete service registration
【 Tamp Dubbo】Dubbo Configuration summary of
【 Tamp Dubbo】Dubbo Load balancing settings for
【 Tamp Dubbo】Dubbo Service fusing and degradation treatment
【 Tamp Dubbo】Dubbo The core principle of
This article is mainly to share what is RPC frame , About RPC The explanation of , There are a lot of information on the Internet , To ensure the integrity of the tutorial , I'd like to share it here , At the same time, I also consolidate myself . Introducing RPC Before , First, let's see how our tradition is called .
For example, now I want to call a method , Get the order information , So in traditional projects , It's usually called directly , as follows :
Now? , Based on the consideration of high performance and high reliability , You decide to transform the system into a distributed application , A lot of functions that can be shared are brought out by themselves , For example, the order information mentioned above , You put it in a service alone , Let other services call it . So it's like this :
Here comes the question , service A There is no OrderServiceImpl This class , So how does it call services B Of OrderServiceImpl Of get Methods? ? This can be used to RPC frame 了 , So we know ,RPC The framework is mainly used to solve two problems :
- Solve the problem in distributed system , Call between services .
- When called remotely , It should be as convenient as local call , Make the caller imperceptible to the logic of the remote call .
Let's see RPC How to explain :Remote Procedure Call, Remote procedure call , It is a way of inter process communication , It's a technical idea , Not a norm . It allows the program to call another address space ( Usually on another machine that shares the network ) A process or function of , Instead of programmers explicitly coding the details of this remote call . That is, whether the programmer calls local or remote functions , Essentially, the call code written is basically the same . So the details don't matter to programmers .
Let's see RPC What has been done inside the framework , Quote the pictures on the Internet :
As can be seen from this picture , Whole RPC The call procedure of the involves a procedure and several concepts , Let's summarize :
- Client: Calling end , Call the service locally , It's equivalent to the above Server A.
- client stub: Responsible for receiving the call 、 The parameters are assembled into a message body capable of network transmission ( serialize );client stub Find the service address , And send the message to the server .
- server stub: Decode the message upon receipt , Deserialization ;server stub The local service is invoked based on the decoding results ; The local service executes and returns the result to server stub.server stub The returned result is packaged into a message and sent to the consumer .
- client stub Message received , And decode it , Deserialization , Service consumers get the end result .
This process , We can use a flowchart to represent , It will be more intuitive :
So you can see ,RPC The two core modules of are : Communication and serialization .RPC There are a lot of , such as :Dubbo、gRPC、Thrift、HSF wait , Let me summarize Dubbo Use .
版权声明
本文为[weixin_ forty-six million two hundred and seventy-two thousand ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230748008948.html
边栏推荐
- My heart's broken! A woman's circle of friends envied others for paying wages on time and was fired. Even her colleagues who liked her were fired together
- QFileDialog select multiple files or folders
- 对OutputStream类的flush()方法的误解
- An example of network communication based on TCP / IP protocol -- file transmission
- 队列(c语言/链表)
- 利用Js实现一个千分位
- Qtablewidget header customization and beautification developed by pyqt5 (with source code download)
- stm32以及freertos 堆栈解析
- Weekly leetcode - 06 array topics 7 ~ 739 ~ 50 ~ offer 62 ~ 26 ~ 189 ~ 9
- Online app resource download website source code
猜你喜欢
QT reading and writing XML files
CGM optimizes blood glucose monitoring and management -- Yiyu technology appears in Sichuan International Medical Exchange Promotion Association
CSV column extract column extraction
数据可视化:使用Excel制作雷达图
LeetCode简单题之三除数
Search the complete navigation program source code
WordPress love navigation theme 1.1.3 simple atmosphere website navigation source code website navigation source code
监控智能回放是什么,如何使用智能回放查询录像
The third divisor of leetcode simple question
Failed to convert a NumPy array to a Tensor(Unsupported Object type int)
随机推荐
The simple problem of leetcode is to calculate the numerical sum of strings
校园转转二手市场源码下载
对li类数组对象随机添加特性,并进行排序
Why are there 1px problems? How?
LeetCode-199-二叉树的右视图
rust 使用tokio的Notify 和timeout实现类似可超时条件变量的效果
线程的调度(优先级)
word加水印
输入/输出系统
Listed on the Shenzhen Stock Exchange: the market value is 5.2 billion yuan. Lu is the East and his daughter is American
【深度好文】Flink SQL流批⼀体化技术详解(一)
使用JWT生成与解析Token
对OutputStream类的flush()方法的误解
分组背包呀
LeetCode简单题之计算字符串的数字和
Campus transfer second-hand market source code download
利用Js实现一个千分位
DOM 学习之—添加+-按钮
ASAN 极简原理
Using qlst excel file