知识卡片
并行Saga分离事务与协调
Parallel Saga采用异步、最终一致和编排:领域服务各自维持事务,协调器管理流程和错误修复。它可并行执行、让不同领域独立扩容,并在错误后通过异步重试、数据同步或补偿收敛,适合需要扩展的复杂流程。代价是暂时不一致以及异步时序、竞态和队列可靠性问题;没有整体原子性并不等于无需管理失败状态。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 事务Saga · 查看原书依据
This pattern uses a mediator, making it suitable for complex workflows. However, it uses asynchronous communication, allowing for better responsiveness and parallel execution. Consistency in the pattern lies with the domain services, which may require some synchronization of shared data, either in the background or driven via the mediator.
参考来源
- 位置:《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)
- 结论依据:原文的定义、示例或失败路径支持以下归纳:Parallel Saga采用异步、最终一致和编排:领域服务各自维持事务,协调器管理流程和错误修复。 其他条件结合本章同小节说明;不将模式目标当成已有运行保证。
- 原始内容:This pattern uses a mediator, making it suitable for complex workflows. However, it uses asynchronous communication, allowing for better responsiveness and parallel execution. Consistency in the pattern lies with the domain services, which may require some synchronization of shared data, either in the background or driven via the mediator.