知识卡片
决策快照保留因果
为解释一个决定,要保留当时所使用的状态或版本。监控可以另显示更新状态,但应区分两者。若多个字段必须来自同一次更新,可用同一锁保护或一次发布不可变快照。多个各自顺序一致的原子读仍可能来自不同逻辑版本。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 6. Reactive Programming 快照、决策与原子更新 · 查看原书依据
In our system, it’s not the end of the world if the temperature display is slightly off for a split second. It could be argued that it is more important to take a snapshot, make decisions from that snapshot, and print that snapshot in order to see the exact data used to make a decision. This would also give us clear debugging information. We could
参考来源
- 位置:《Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)》第06章《Chapter 6. Reactive Programming》,快照、决策与原子更新(来源项目 book-source,extracted/Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)/_epub-src/OEBPS/ch06.html#id41)
- 结论依据:原书比较照录决策使用的数据、重新读取实时值以及同时记录两者。
- 原始内容:In our system, it’s not the end of the world if the temperature display is slightly off for a split second. It could be argued that it is more important to take a snapshot, make decisions from that snapshot, and print that snapshot in order to see the exact data used to make a decision. This would also give us clear debugging information. We could