← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 4954.a

分开处理读写约束

理解等级:中级

分布式读取主要影响可感知延迟与可用性,可用本地缓存或显式异步接口降低影响;长查询应表达202 Accepted及后续状态。写入更关键的是完整性:多个目标中一个失败,可能要求撤销已成功写入,因此应尽量缩小单次写入的目标数。读优化不等于写一致性方案。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 用超媒体思考与设计 · 查看原书依据

      It is possible that a single data write message needs to be processed by multiple services (either inline or parallel) and each interaction brings with it the possibility of a write error. In some cases, failure at just one of the storage sources means that all the other storage sources need to reject (or undo) the write, too. For this reason, it is best to limit the number of targets for each write action. One is best; any more than that are a problem.

    参考来源

    - 位置:《RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data (Mike Amundsen)》第02章《用超媒体思考与设计》(来源项目 book-sources;源文件:extracted/RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data (Mike Amundsen)/_epub-src/OEBPS/ch02.xhtml;小节:分布式数据) - 结论依据:原文以分布式读取主要影响可感知延迟与可用性,可用本地缓存或显式异步接口降低影响;长查询应表达202 Accepted及后续状态的机制或场景为依据;同小节余文补充本卡所列条件,按2022年原书语境整理。 - 原始内容:It is possible that a single data write message needs to be processed by multiple services (either inline or parallel) and each interaction brings with it the possibility of a write error. In some cases, failure at just one of the storage sources means that all the other storage sources need to reject (or undo) the write, too. For this reason, it is best to limit the number of targets for each write action. One is best; any more than that are a problem.