知识卡片

普通读书笔记卡 · 3327.k

共享持久化库固化技术选择

理解等级:高级

多个服务共用 DAO、持久化对象和框架库,虽能减少重复代码,却会固定技术选择和升级节奏;服务即便不直接共享数据库,仍可能被统一库版本和存储模型绑定。应以公开服务契约隔离持久化细节。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Principles of Software Architecture Modernization》第3章《Anti-Patterns: Distributed Monoliths》(源文件:`_epub-src/OPS/ch03.xhtml`,归一化正文 [8285:12558)) - 结论依据:原文比较共享持久化库的表面复用收益与技术偏好、全员迁移、同步成本和脆弱契约问题,指出它不能解决分布式单体。 - 原始内容:All or nothing migrations: Teams must coordinate, leading to long waterfall migrations and/or branch explosion. What happens when the Profile Service wants to migrate from Hibernate 4 to 5, but the Reports service does not have the bandwidth or wants to upgrade. A lot of headaches.