Skip to content

Sequence # instead of datetime in historic? #56

Answered by meatballs
jshaffstall asked this question in Q&A
Discussion options

You must be logged in to vote

That's the subject of much debate in several event sourcing projects.

Transaction conflicts aren't really an issue as the sequence number is obtained within the same transaction as an event is written.

#35 is about avoiding the spurious transaction problems that can arise under heavy load.

The sequence number absolutely guarantees order. There is no possibility of identical values, as there is with a timestamp. It also identifies a record for play and rewind by projections rather than attempting to hold the time to which they've been played (which is tricky and error prone).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jshaffstall
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