Skip to content

Snapshots #1791

Answered by superroma
mikecann asked this question in Q&A
Apr 6, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

These are low level methods that event store need to implement, app devs unlikely will call them.

Snapshots are designed to be trasparent for you.

Aggregate state is json built by running a projection function as a reducer on event stream.
If number of events used is greater than N, aggregate state is saved to event store as a snapshot.

Next time aggregate state is built from snapshot forward, so building an aggregate state should read not more than N records from event store (including snapshot).

N is 100 currently.

If you change projection function, snapshot became unusable, so snapshots are marked by hash of projection function (this hash is calculated during reSolve build process). So…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mikecann
Comment options

Answer selected by mikecann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants