Event Sourcing & CQRS · Evolution and Compliance
Event-Sourcing Technology Landscape
Frameworks and stores by stack.
You can event-source with plain tables, but frameworks help with aggregates, projections and subscriptions: Axon Framework (Java), Marten and Eventuous (.NET), EventStoreDB/KurrentDB clients (many languages), Commanded (Elixir), eventsourcing (Python library), Emmett (TypeScript), and DynamoDB/Cosmos DB-based designs. Choose based on stack, operational appetite and whether you need projections and subscriptions out of the box.
Libraries and stores
| Stack | Options | Store |
|---|---|---|
| Java/Kotlin | Axon Framework, EventStoreDB client | Axon Server, RDBMS, EventStoreDB |
| .NET | Marten, Eventuous | PostgreSQL, EventStoreDB |
| Python | eventsourcing library | PostgreSQL, SQLite, EventStoreDB |
| TypeScript/Node | Emmett, EventStoreDB client | PostgreSQL, EventStoreDB, MongoDB |
| Elixir | Commanded | PostgreSQL (EventStore), EventStoreDB |
| Cloud-native | DynamoDB streams pattern | DynamoDB + Streams |
# DynamoDB event store pattern
PK = "account#42", SK = "v#000005" (stream version), conditional put: attribute_not_exists(SK)
DynamoDB Streams → Lambda projectors → read models
Common pitfalls
- Adopting a heavyweight framework for one small aggregate.
- Choosing a store without subscription/catch-up support.
- Vendor lock-in without an export strategy.
Key points
- Frameworks reduce boilerplate
- Postgres-based options are pragmatic
- Check subscriptions and tooling
Further reading: Python eventsourcing library
Practice questions
How can DynamoDB enforce optimistic concurrency for event streams?
Answer
Use the stream version as the sort key with a conditional put (attribute_not_exists), so two writers can't append the same version.
Why is PostgreSQL a popular event store choice?
Answer
It's familiar and transactional, supports JSONB payloads, unique constraints for concurrency, and libraries like Marten build event-store features on top.
Open in the app to mark lessons complete, take notes and track your progress.