知识卡片

普通读书笔记卡 · 3332.c

服务封装降低消费者迁移

理解等级:高级

把共享能力置于稳定服务契约后,框架、语言和数据库升级可留在提供方内部,消费者不必随底层库同步迁移。代价是网络调用和服务可用性进入关键路径,必须结合延迟、吞吐与容错判断。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Principles of Software Architecture Modernization》第4章《Anti-Patterns: Internal Shared Libraries》(源文件:`_epub-src/OPS/ch04.xhtml`,归一化正文 [46195:50432)) - 结论依据:原文列出服务实现可独立迁移 JDK、框架和数据库,而消费者只需面对公开业务契约;同节说明远程调用可靠性与性能成本。 - 原始内容:Having a service instead of an internal shared library, as long as we are not breaking the public contract, whatever internal migration might need to happen will stay within the service. For instance, we can do the following without consumer impact: JDK migration : Change Java from 8 to 17. Major framework modernization : Upgrade big frameworks like Spring, Spring Boot, and Hibernate, even major versions. Database major migrations : Increment versions of your database like Postgres, MySQL, etc.