知识卡片
时间旅行Saga适合单向流
Time Travel Saga采用同步、最终一致和舞蹈。各服务接受请求、完成本地事务,再转交下一服务,整体结果随时间逐步一致。它适合线性数据摄取等强调吞吐的流程,同步调用比异步更容易推理和调试。缺少协调器意味着每个服务都要处理自己的异常、上下文与收敛;复杂补救所需的同步往返会拖慢响应,不能仅因最终一致就认为没有协调成本。
与[[童话Saga放宽整体原子]]相比,这里进一步把流程责任分散给参与服务。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 事务Saga · 查看原书依据
This architecture can implement the Chain of Responsibility design pattern or the Pipes and Filters architecture style—any workflow with a one-way series of steps. Each service in this pattern “owns” its own transactionality, so architects must design workflow error conditions into the domain design.
参考来源
- 位置:《Software Architecture The Hard Parts Modern Trade-Off Analyses for Distributed Architectures (Neal Ford, Mark Richards, Pramod Sadalage etc.)》第12章《Chapter 12. Transactional Sagas》(来源项目:book-sources;源文件:extracted/Software Architecture The Hard Parts Modern Trade-Off Analyses for Distributed Architectures (Neal Ford, Mark Richards, Pramod Sadalage etc.)/_epub-src/OEBPS/ch12.xhtml)
- 结论依据:原文的定义、示例或失败路径支持以下归纳:Time Travel Saga采用同步、最终一致和舞蹈。 其他条件结合本章同小节说明;不将模式目标当成已有运行保证。
- 原始内容:This architecture can implement the Chain of Responsibility design pattern or the Pipes and Filters architecture style—any workflow with a one-way series of steps. Each service in this pattern “owns” its own transactionality, so architects must design workflow error conditions into the domain design.