文章目录
gRPC
What is gRPC
A high performance, open-source universal RPC framework
Why use gRPC
- grpc 能够更加严格的定义 request and response 格式
- protocol buffer 将数据编码为二进制,大大减少数据的传输量
- grpc 基于 http2.0,可以方便的支持流式通信
How to use
protocol buffer 3
What is protocal buffer
Protocol Buffers 是一种与语言无关,平台无关的可扩展机制,用于序列化结构化数据。
Why use protocal buffer
- 性能较xml,json, thirft等好,效率高
- 代码生成机制,数据解析类自动生成
- 支持向后兼容和向前兼容