知识卡片
事件存储追加并验版本
事件存储是保存事件的仅追加数据库,最小能力是读取某个业务实体的全部事件,以及按预期版本追加新事件。若读取后又有其他进程追加事件,预期版本失效,存储应报告并发冲突,避免把基于旧状态的决策直接落地。普通投影存储不能承担这个强一致职责。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 建模时间维度 · 查看原书依据
The event store should not allow modifying or deleting the events2 since it’s append-only storage. To support implementation of the event sourcing pattern, at a minimum the event store has to support the following functionality: fetch all events belonging to a specific business entity and append the events. For example: interface IEventStore { IEnumerable<Event> Fetch(Guid
参考来源
- 位置:《Learning Domain-Driven Design》第7章《建模时间维度》(来源项目:book-sources;源文件:extracted/Learning Domain-Driven Design/_epub-src/OEBPS/ch07.html)
- 结论依据:原文围绕本卡所述机制给出定义、适用条件及相关取舍,以下摘录为直接依据。
- 原始内容:The event store should not allow modifying or deleting the events2 since it’s append-only storage. To support implementation of the event sourcing pattern, at a minimum the event store has to support the following functionality: fetch all events belonging to a specific business entity and append the events. For example: interface IEventStore { IEnumerable<Event> Fetch(Guid