当前位置:网站首页>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
边栏推荐
- QT reading and writing XML files
- idea:使用easyYapi插件导出yapi接口
- Talk about the basic but not simple stock data
- The annotation is self-defined by implementing the parameter parser handlermethodargumentresolver interface
- Compiler des questions de principe - avec des réponses
- vslam PPT
- Listed on the Shenzhen Stock Exchange: the market value is 5.2 billion yuan. Lu is the East and his daughter is American
- 5.6 综合案例-RTU-
- stm32以及freertos 堆栈解析
- [appium] encountered the problem of switching the H5 page embedded in the mobile phone during the test
猜你喜欢
idea:使用easyYapi插件导出yapi接口
Discussion on ES6 tail tune optimization
Transformer-XL: Attentive Language ModelsBeyond a Fixed-Length Context 论文总结
vslam PPT
Online yaml to XML tool
clang 如何产生汇编文件
Detailed explanation of ansible automatic operation and maintenance (I) installation and deployment, parameter use, list management, configuration file parameters and user level ansible operating envi
2022.4.11-4.17 AI industry weekly (issue 93): the dilemma of AI industry
vslam PPT
怎么读书读论文
随机推荐
Why are there 1px problems? How?
剑指offer day24 数学(中等)
Data deletion and modification (MySQL)
Weekly leetcode - 06 array topics 7 ~ 739 ~ 50 ~ offer 62 ~ 26 ~ 189 ~ 9
ATSS(CVPR2020)
单点登录 SSO
通过实现参数解析器HandlerMethodArgumentResolver接口来自定义注解
Qt读写XML文件
Talk about the basic but not simple stock data
校园转转二手市场源码下载
ApplicationReadyEvent的使用
mysql查询字符串类型的字段使用数字类型查询时问题
SYS_CONNECT_BY_PATH(column,'char') 结合 start with ... connect by prior
Interesting JS code
室内定位技术对比
情境领导者-第七章、解决绩效问题
PyQt5开发之QTableWidget表头自定义与美化(附源代码下载)
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
Qt读取路径下所有文件或指定类型文件(含递归、判断是否为空、创建路径)
AAAI 2022 recruit speakers!!