知识卡片
前端控制器持有流程状态
舞蹈中可让第一个被调用的领域服务兼管流程状态,这就是此处的前端控制器模式。订单服务同时保存订单与执行进展,其他服务回报或查询它,用户因而有明确的状态查询入口。代价是领域服务兼任伪协调器,职责与通信往返都增加;当状态更新很密集时,性能和扩展性也会受影响。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 管理分布式工作流 · 查看原书依据
First, the Front Controller pattern places the responsibility for state on the first called service in the chain of responsibility, which in this case is Order Placement Service. If that service contains information about both orders and the state of the workflow, some of the domain services must have a communication link to query and update the order state, as illustrated in Figure 11-13.
参考来源
- 位置:《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)
- 结论依据:原文的定义、示例或失败路径支持以下归纳:舞蹈中可让第一个被调用的领域服务兼管流程状态,这就是此处的前端控制器模式。 其他条件结合本章同小节说明;不将模式目标当成已有运行保证。
- 原始内容:First, the Front Controller pattern places the responsibility for state on the first called service in the chain of responsibility, which in this case is Order Placement Service. If that service contains information about both orders and the state of the workflow, some of the domain services must have a communication link to query and update the order state, as illustrated in Figure 11-13.