知识卡片

普通读书笔记卡 · 3444

服务数据由接口封装

理解等级:中级

拆出可独立部署的服务时,需同时辨认它负责的数据,并让其他组件通过 API 访问,而非直接读取其内部数据。这样服务边界同时约束行为和数据访问;若只拆代码却继续共享内部数据,自治性仍会受损。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Microservice APIs》第 1 章《What are microservice APIs?》(源文件:_epub-src/OEBPS/Text/01.htm) - 结论依据:1.1.3 节用 Amazon 早期服务化案例说明先拆出独立部署的组件,再识别各组件所属数据,并要求其他部分只能经 API 访问这些数据。 - 原始内容:As part of this process, they also identified the data that belongs to those components and made sure that other parts of the system could not access the data except through an API.