知识卡片

普通读书笔记卡 · 3360

跨域聚合的复杂度要选址

理解等级:高级

细粒度服务遇到跨域需求时,调用与聚合复杂度一定会落在某一层。决定放进领域服务、聚合服务、BFF 或网关时,要看复用范围、领域内聚和调用方负担;不能默认把协调工作推给界面。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Principles of Software Architecture Modernization》第2章《Anti-Patterns: Lack of Isolation》(源文件:`_epub-src/OPS/ch02.xhtml`,归一化正文 [54591:58822)) - 结论依据:原文指出小服务面对跨功能需求时需由某组件调用多服务,复杂度常被上推,并列出服务、聚合服务、BFF、GraphQL、网关及按领域重组的选址。 - 原始内容:As services get more focused, they tend to be smaller, which creates a problem when you have a requirement that covers a broad array of your application’s functionality. Some component likely needs to call multiple services, and this inherent complexity found in distributed architectures is often pushed upwards to the caller. Calling multiple services, or aggregating their output, is not wrong per se, but can cause issues.