当前位置:网站首页>RPC通信原理与项目技术选型
RPC通信原理与项目技术选型
2022-07-25 07:08:00 【_索伦】
RPC通信原理
RPC(Remote Procedure Call Protocol):远程过程调用协议。



技术选型
消息的序列化和反序列化使用的是 protobuf。
protobuf(protocol buffer)是google 的一种数据交换的格式,它独立于平台语言。
google 提供了protobuf多种语言的实现:java、c#、c++、go 和 python,每一种实现都包含了相应语言的编译器以及库文件。
由于它是一种二进制的格式,比使用 xml(20倍) 、json(10倍)进行数据交换快许多。可以把它用于分布式应用之间的数据通信或者异构环境下的数据交换。作为一种效率和兼容性都很优秀的二进制数据传输格式,可以用于诸如网络传输、配置文件、数据存储等诸多领域。
和Json的区别:
- protobuf是二进制存储,xml和Json是文本存储的。
- protobuf不需要存储额外的信息,只存储有效数据,Json存储的是 key-value。
网络部分,包括寻找rpc服务主机,发起rpc调用请求和响应rpc调用结果,使用muduo网络
库和zookeeper服务配置中心(专门做服务发现)。
边栏推荐
- Microorganisms are healthy. Don't exclude microorganisms in the human body
- 【每日一题】1184. 公交站间的距离
- MySQL remote login
- 微生物健康,不要排斥人体内微生物
- Openatom xuprechain open source biweekly report | 2022.7.11-2022.7.22
- 【愚公系列】2022年7月 Go教学课程 015-运算符之赋值运算符和关系运算符
- 2022深圳杯
- Cointelegraph撰文:依托最大的DAO USDD成为最可靠的稳定币
- [yolov5 practice 3] traffic sign recognition system based on yolov5 - model training
- runtimecompiler 和 runtimeonly是什么
猜你喜欢

BOM概述

How to learn C language?

Thread 类的基本用法

EFCore高级Saas系统下单DbContext如何支持不同数据库的迁移

With apple not making money, the 2trillion "fruit chain" abandons "fruit" and embraces "special"

Devops has been practiced for many years. What is the most painful thing?

微生物健康,不要排斥人体内微生物

【愚公系列】2022年7月 Go教学课程 016-运算符之逻辑运算符和其他运算符

10 minutes to understand how JMeter plays with redis database

Will eating fermented steamed bread hurt your body
随机推荐
js数据类型的判断——案例6精致而优雅的判断数据类型
用VS Code搞Qt6:编译源代码与基本配置
【SemiDrive源码分析】【驱动BringUp】38 - NorFlash & eMMC分区配置
Special analysis of data security construction in banking industry
error: redefinition of
Labelme labels different objects, displays different colors and batch conversion
[yolov5 practice 3] traffic sign recognition system based on yolov5 - model training
Baidu Post Bar crawler gets web pages
vulnhub CyberSploit: 1
不只是日志收集,项目监控工具Sentry的安装、配置、使用
With apple not making money, the 2trillion "fruit chain" abandons "fruit" and embraces "special"
【每日一题】剑指 Offer II 115. 重建序列
微信小程序wx.request接口
Restrict Su command and sudo mechanism to promote nmap and console command netstat
Ant design input search box listens for allowclear event separately
Rust标准库-实现一个TCP服务、Rust使用套接字
章鱼网络 Community Call #1|开启 Octopus DAO 构建
CodeForces 1417B Two Arrays
【愚公系列】2022年7月 Go教学课程 015-运算符之赋值运算符和关系运算符
Mysql database