知识卡片
异步调用仍可能被契约耦合
异步消息可以减少服务之间同时在线、等待响应的动态耦合,但双方仍依赖消息格式或接口契约,存在静态耦合。微服务治理因此要同时看运行时调用和共享契约、类库等构建时依赖;只把同步调用改为异步,不能证明服务已经独立演进。原书未给出适用于所有系统的耦合数量阈值。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Microservices Architecture · 查看原书依据
while architects can use asynchronous communication protocols to dynamically decouple services, they might nevertheless still be statically coupled by the contract used between them (regardless of communication type).
参考来源
- 位置:《Fundamentals of Software Architecture》原书第18章《Microservices Architecture》(阅读计划第21项,单元16;源文件:`OEBPS/ch18.html`)
- 结论依据:原书区分静态和动态耦合,明确异步协议仍可能被契约静态耦合;末句呼应作者拒绝统一阈值。
- 原始内容:while architects can use asynchronous communication protocols to dynamically decouple services, they might nevertheless still be statically coupled by the contract used between them (regardless of communication type).