知识卡片
无状态舞蹈按需重建进度
无状态舞蹈不保存整体的临时流程状态,各服务仍拥有自己的业务结果。查询订单进展时,必须逐个询问服务并组装当前快照。正常推进流程可保持高度解耦,代价是查询阶段网络往返和组合逻辑很重;复杂流程的状态重建尤其昂贵。“无状态”并不等于系统没有业务数据,也不保证状态查询高性能。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 管理分布式工作流 · 查看原书依据
A second way for an architect to manage the transactional state is to keep no transient workflow state at all, relying on querying the individual services to build a real-time snapshot. This is known as stateless choreography. While this simplifies the state of the first service, it greatly increases network overhead in terms of chatter between services to build a stateful snapshot.
参考来源
- 位置:《Software Architecture The Hard Parts Modern Trade-Off Analyses for Distributed Architectures (Neal Ford, Mark Richards, Pramod Sadalage etc.)》第11章《Chapter 11. Managing Distributed Workflows》(来源项目: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/ch11.xhtml)
- 结论依据:原文的定义、示例或失败路径支持以下归纳:无状态舞蹈不保存整体的临时流程状态,各服务仍拥有自己的业务结果。 其他条件结合本章同小节说明;不将模式目标当成已有运行保证。
- 原始内容:A second way for an architect to manage the transactional state is to keep no transient workflow state at all, relying on querying the individual services to build a real-time snapshot. This is known as stateless choreography. While this simplifies the state of the first service, it greatly increases network overhead in terms of chatter between services to build a stateful snapshot.