知识卡片

普通读书笔记卡 · 3332.j

gRPC迁移需维持消费者契约

理解等级:高级

gRPC 适合受控服务间通信和流式传输,但二进制调试、浏览器支持与边缘缓存不同于 REST。协议本身属于消费者契约,切换时应并行暴露、迁移调用方,再退役旧入口。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Principles of Software Architecture Modernization》第8章《Embracing New Technology》(源文件:`_epub-src/OPS/ch08.xhtml`,归一化正文 [88664:92991)) - 结论依据:原文比较 gRPC 优劣,并强调从 REST 切换会影响现有消费者。 - 原始内容:One important architecture and design consideration you need to keep in mind when choosing between API communication options like REST, gRPC, GraphQL or other options is that API communication is part of the service contract therefore. If you choose it, you will need to maintain it, and if you change it, you will break consumers. Let us say your service exposes a contract with REST + JSON, and you have 10 consumers accessing this contract via this API exposure.