3 ms·
I'd be curious if anyone has experience using Mongo or other document DBs as a read model projection database in a CQRS event sourced system. That is, data whi
by stetrain 6y ago
I'd be curious if anyone has experience using Mongo or other document DBs as a read model projection database in a CQRS event sourced system.
That is, data which can be reconstructed from a consistent event store at any point, and is organized into structures for fast querying and loading for display on the client.
- Backend load -> update -> store updates must be atomic and consistent
- Client reads are fine being eventually consistent
- Need to store structured data (ie a calendar event with the names of all participants) but also find and update nested data (ie a participant's name changes).
- Client queries need indexed filter and sort capability on specific document fields.
Mongo or similar databases seem like they might be ideal for this use case, since they allow storage of nested document data while still being able to index and perform updates on that nested data, but I haven't really seen a deep dive from anyone using it for this purpose.