Versioning of Events and replay of projections

108 views
Skip to first unread message

Lars Baldes

unread,
Apr 2, 2018, 5:14:11 PM4/2/18
to DDD/CQRS
Hi,

I have a proble understanding how to verison my events propery. For every aggregate i have a separate event stream with an own version sequence.

If i take down a projection (statistics db) for maintenance and after restart I want to get the latest events (even events of aggregates that did not exist prior to the maintenance), ho do i implement that.
The only solution i found so far is a global sequence number over all events so the projection can ask for all events with the global sequence number higher than the last received version in my projection.
I think this solution would lead to performace issues in the write model as I can only write single threaded to the event stream to ensure there are no duplicates of the global sequence number.

Is there a more elegant way to achieve this?

Thanks in advance 
Lars

Greg Young

unread,
Apr 2, 2018, 9:51:00 PM4/2/18
to ddd...@googlegroups.com
ES handles this and can easily write 10,000s of events/second. If using a sql based store just use an identity column or a sequence. There is no issue if the sequence is sparse.

--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/dddcqrs.
For more options, visit https://groups.google.com/d/optout.



--
Studying for the Turing test
Reply all
Reply to author
Forward
0 new messages