知识卡片
向后兼容支持独立升级
提供方A从v1升级到v2后,旧调用方仍发送v1消息,v2能正确接受即本章所说的向后兼容。可优先增添可选字段、保留已有字段语义,减少协调;无法兼容时并行运行两版并路由请求,但持久数据模型也要能共存。旧版本支持应有明确期限与迁移规则,否则兼容分支持续累积;书中三个月只是示例。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 宏观架构中的微服务决策 · 查看原书依据
The first approach is to keep backward compatibility for the API so that A.v1 messages do not fail with the A.v2 endpoint. For example, we can add optional parameters but can’t remove or rename existing parameters.
参考来源
- 位置:《Software Architecture and Decision-Making》第10章《Macro Architecture: Microservices Considerations》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch10.xhtml)
- 结论依据:摘录说明提供方A从v1升级到v2后,旧调用方仍发送v1消息,v2能正确接受即本章所说的向后兼容。其余条件结合本章相邻例子与取舍说明,数字示例不作当前性能承诺。
- 原始内容:The first approach is to keep backward compatibility for the API so that A.v1 messages do not fail with the A.v2 endpoint. For example, we can add optional parameters but can’t remove or rename existing parameters.