知识卡片

普通读书笔记卡 · 2313.e.5.m.14

按工作流控制需求选请求或事件

理解等级:高级

请求模型适合结构清楚、以取数为主且需要确定处理路径与结果的操作;事件模型适合对已发生动作作灵活响应,且更看重响应速度、弹性和动态扩展。事件模型以最终一致、流程控制较弱及难测试为代价。选型先问业务是否必须立即得到确定结果,再衡量异步并行收益,而不是只看峰值吞吐。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《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.