知识卡片
协议选择不能替代兼容设计
REST便于以HTTP资源方式公开接口,GraphQL表达数据查询与修改需求,RPC把远程方法包装成调用。不同协议各有契约与调试成本,gRPC和Protobuf提供兼容演进工具,却不会自动防止破坏性语义变化。原书对SOAP与gRPC的对照是设计提醒,不是某种协议天然紧或松耦合的证明。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Loose Coupling · 查看原书依据
Of course, the data exchange protocol and its contract isn’t the only variable in inter-service communications. There are, in fact, two broad classes of messaging patterns: Request-Response (Synchronous) A two-way message exchange in which a requester (the client) issues a request of a receiver (the service) and waits for a response. A textbook example is
参考来源
- 位置:《Cloud Native Go》第08章《Loose Coupling》(来源项目book-sources;源文件:extracted/Cloud Native Go (Matthew A. Titmus)/_epub-src/OEBPS/ch08.xhtml)
- 结论依据:REST便于以HTTP资源方式公开接口,GraphQL表达数据查询与修改需求,RPC把远程方法包装成调用。原文相应定义、示例或限制为此结论提供依据;补充纠错与版本边界在正文就近标明。
- 原始内容:Of course, the data exchange protocol and its contract isn’t the only variable in inter-service communications. There are, in fact, two broad classes of messaging patterns: Request-Response (Synchronous) A two-way message exchange in which a requester (the client) issues a request of a receiver (the service) and waits for a response. A textbook example is