知识卡片

普通读书笔记卡 · 3361

聚合服务取决于复用范围

理解等级:高级

多个消费者都需要同一跨域数据组合时,独立聚合服务可集中复用且不必把两个领域塞进一个服务;若只为单个界面服务,它可能引入多余部署和协作成本。应先确认复用需求。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Principles of Software Architecture Modernization》第2章《Anti-Patterns: Lack of Isolation》(源文件:`_epub-src/OPS/ch02.xhtml`,归一化正文 [54591:58822)) - 结论依据:原文比较把聚合塞进现有服务与建立专门聚合服务,指出后者可跨消费者复用,却可能对仅 UI 使用的场景投入过度。 - 原始内容:Aggregation service: We can create an orchestration/aggregation service in order to handle the aggregation/feature. We are not coupling sales and profiles, and since we have a new service, we can easily reuse this across different consumers and future needs. but it could be wasted effort if only the UI cares about this aggregation.