知识卡片

普通读书笔记卡 · 3541

gRPC由模式生成通信桩

理解等级:中级

gRPC 以 Protocol Buffers 模式描述交换数据,再生成客户端与服务端的语言绑定代码,减少两端手写序列化的不一致。模式演进仍须兼顾旧客户端,二进制编码也不能替代业务有效性校验。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Microservice APIs》附录 A《Types of web APIs and protocols》(源文件:_epub-src/OEBPS/Text/A.htm) - 结论依据:原文说明先写 Protobuf 模式,再生成客户端和服务端代码,支持模式驱动通信。 - 原始内容:in gRPC you must first define the schema for the data structures that you want to exchange over the API using the Protobuf specification format, and then use the Protubuf CLI to automatically generate code for both the client and