知识卡片

普通读书笔记卡 · 2313.e.5.l.1

粗粒度服务内部完成业务编排

理解等级:中级

一个领域服务可在入口 API 外观层接收业务请求,再在服务内部调用业务与持久化组件完成多个步骤。原书的下单示例把订单生成、付款和库存更新放在同一个 OrderService 中协调;这与跨多个远程微服务编排不同。这里是逻辑与部署范围示例,不保证真实外部支付机构也在同一事务内。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Service-Based Architecture Style · 查看原书依据

      The API access facade internally orchestrates everything that has to happen to fulfill this request: placing the order, generating an order ID, applying the payment, and updating the inventory for each product ordered.

    参考来源

    - 位置:《Fundamentals of Software Architecture》原书第14章《Service-Based Architecture Style》(阅读计划第17项;源文件:`OEBPS/ch14.html`) - 结论依据:原文解释 API facade 在粗粒度服务内部编排请求,并用电商下单对比多服务远程编排。 - 原始内容:The API access facade internally orchestrates everything that has to happen to fulfill this request: placing the order, generating an order ID, applying the payment, and updating the inventory for each product ordered.