EventsSourcing-on-Azure-Functions icon indicating copy to clipboard operation
EventsSourcing-on-Azure-Functions copied to clipboard

TimeStreams - event streams keyed by timestamp

Open MerrionComputing opened this issue 4 years ago • 3 comments

Another possible evolution of the Eventstream would be a stream keyed by timestamp which allows add/edit/update/delete but only for future dated events.

This could keep very similar code to the existing event stream code and projections would be able to run over them too - but would use different classes/attributes and different notifications as they would have a different business meaning.

MerrionComputing avatar May 29 '21 13:05 MerrionComputing

Would need to use a common time frame - and I think there is a minimum sensible granularity to be found too (maybe 1 second?)

MerrionComputing avatar May 29 '21 14:05 MerrionComputing

Thoughts

It would be possible to insert retrospective events which means that any cached or snapshotted state impacted would need to be recalculated. It would be preferable if this did not require the application developer to do any extra code

Also would need some strategy as to what to do in the event of a collision. Maybe a .00 - .99 extension so that the events at the same time are processed in the order in which they are known about.

MerrionComputing avatar Oct 30 '21 19:10 MerrionComputing

Will use the same type of attribute as for event streams but with a different attribute name to differentiate e.g. :

[TimeStream("Bank","Account", "A123456")]

MerrionComputing avatar Mar 01 '23 10:03 MerrionComputing