Versioning of Events and replay of projections

已查看 108 次
跳至第一个未读帖子

Lars Baldes

未读,
2018年4月2日 17:14:112018/4/2
收件人 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

未读,
2018年4月2日 21:51:002018/4/2
收件人 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
回复全部
回复作者
转发
0 个新帖子