知识卡片

普通读书笔记卡 · 4359.c

数据隔离后要指定事实来源

理解等级:高级

微服务不把共享表或数据库当作跨域集成点。原书指出,一旦同一事实分散在多个服务,必须明确它的权威来源与传播方式:可以指定一个领域拥有该事实,其他服务向它查询;也可以通过复制或缓存分发数据,但要接受同步时差与副本治理。只说“每服务一个库”仍不足以解决客户资料、价格等跨域事实的来源冲突;选择哪种方式取决于读取延迟和一致性要求。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Microservices Architecture · 查看原书依据

      So every architect must decide how they want to handle this problem: either identifying one domain as the source of truth for some fact and coordinating with it to retrieve values, or distributing information through database replication or caching.

    参考来源

    - 位置:《Fundamentals of Software Architecture》原书第18章《Microservices Architecture》(阅读计划第21项,单元06;源文件:`OEBPS/ch18.html`) - 结论依据:原书要求避免共享模式/数据库耦合,并列出指定一个领域为事实源后协调读取、或通过复制/缓存分发两种路径;末句是选择条件的归纳。 - 原始内容:So every architect must decide how they want to handle this problem: either identifying one domain as the source of truth for some fact and coordinating with it to retrieve values, or distributing information through database replication or caching.