Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I did a formal model of an event source system used in production and it was quite illuminating. It turns out that concurrency is something one should take into account when designing these systems. Versioning often refers to two things:

1. The event data itself; when business cases change or understanding grows we wish to add, remove, or change the type of different fields in an event record.

2. The current state of a projected model

The latter is what requires some form of co-ordination otherwise you can end up with events being written in an incorrect order and produce the wrong state.

It is a good idea though to avoid event sourcing all of your models. Microsoft wrote about their experiences implementing an event-sourced application and how they reached that conclusion [0]. In my experience it's because of temporal properties: event sourced systems are inherently eventually consistent systems. When you have domain models that depend on one another you will need to be quite certain that A eventually leads to B which eventually leads to C and that if a failure happens along the way that nothing is lost or irrecoverable.

[0] https://docs.microsoft.com/en-us/previous-versions/msp-n-p/j...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: