Provide cloud native PaaS/Serverless solution for Event Store database with all the guarantees required by (ES/CQRS)
MOTIVATION
It's quite challenging exercise to implement reliable and scalable database for Event Store using CosmosDB.
The problem is retrieving the events in the same order as they were inserted and ensure the order never changes.
Imagine scenario, where CosmosDB (SQL API for example) is partitioned and Events are being written concurrently to multiple partitions.
How do I write following cross partition query?
> Give me documents newer than <some timestamp>, so that it always returns documents in the same order.
As far as I understand it can easily happen, that the same query will return:
[Partition1/Doc1, Partition1/Doc2]
and a milisecond later:
[Partition1/Doc1, Partition2/Doc3, Partition1/Doc1]
The deterministic order is very important for the event handlers (e.g denormalizers in Query stack (CQRS)), so that when I replay the events I will get the same state and when handling them in real time.
SUGGESTIONS
Either:
a) provide some example on how to implement EventStore using current Azure services (simmilar to "a CQRS Journey", but focused on infrastructure rather than domain modeling)
b) create new product more suitable for Event Sourcing / CQRS applications. There is EventStore product from Greg Young, but it requires VM which doesn't make it suitable for PaaS/Serverless.
Thanks
2 comments
-
Lars Kemmann commented
This might get more visibility if it wasn't in the "ClearDB" feature section... and yes, this would be amazing!
-
Daniel Turan commented
See also older request: https://feedback.azure.com/forums/217298-storage/suggestions/5075372-provide-a-paas-offering-that-supports-event-sourci
There is similar one as well: https://feedback.azure.com/forums/216926-service-bus/suggestions/18541990-enable-indefinite-storage-of-events-on-event-hub-t
although it suggests using Event HubAs you can see, developers really want it for a long time