知识卡片
按工作流控制需求选请求或事件
请求模型适合结构清楚、以取数为主且需要确定处理路径与结果的操作;事件模型适合对已发生动作作灵活响应,且更看重响应速度、弹性和动态扩展。事件模型以最终一致、流程控制较弱及难测试为代价。选型先问业务是否必须立即得到确定结果,再衡量异步并行收益,而不是只看峰值吞吐。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Event-Driven Architecture Style · 查看原书依据
We recommend choosing the request-based model for well-structured, data-driven requests (such as retrieving customer profile data), when the priority is certainty and control over the workflow.
参考来源
- 位置:《Fundamentals of Software Architecture》原书第15章《Event-Driven Architecture Style》(阅读计划第18项,单元24;源文件:`OEBPS/ch15.html`)
- 结论依据:原书直接比较请求型与事件型适用场景,并在表15-2列出事件模型收益和代价。
- 原始内容:We recommend choosing the request-based model for well-structured, data-driven requests (such as retrieving customer profile data), when the priority is certainty and control over the workflow.