Greg recently tweeted an interesting observation…
“I am curious. To this day I am the only person I know who has written projections that handle multiple concurrent events. I can think of many reasons for why this is. Are people not running into IO issues due to vast hardware improvements or are people just not working on high throughput systems?”
I have reproduced it here because Twitter is not ideal for technical discussion (for someone as wordy as me).
This isn’t necessarily about EventStore but I think it is relevant to this community, and I hope Greg doesn’t mind it being put here.
So what does this observation actually mean?
1) Before I can absorb this I need to know more about these concurrent events:
-
Are these events in the same stream?
-
Are they concurrent by design/intention, or is it accidental and undesirable?
-
Is this a “Projection” in the EventStore sense, or something different?
2) If I don’t explicitly handle these events in my projection then what negative outcome might occur:
-
If in the same stream then surely they now have an order, even if it was decided by chance.
-
If in different streams then I see why this could blow up.
-
If the projection was reset then might it produce a different result?
3) Why are others seemingly not handling this scenario:
4) Does the mention of IO issues and hardware suggest that this problem could become more prevalent?
5) Finally, the big question, assuming there really is a problem that is not being adequately handled…
Are there any new links or resources on how to handle concurrency in event sourced systems or is it the same as handling concurrency in an HTTP API?