Aeon is an experimental serverless event store built on AWS DynamoDB, designed to explore event sourcing, CQRS, and event-driven architectures. Implemented as a TypeScript library and an AWS CDK construct, Aeon makes it easy to deploy and experiment with event stores in your own AWS environment. If you’re curious about strong event ordering, optimistic concurrency, and eventual consistency, Aeon provides a hands-on way to dive in without the complexity of a full-scale framework.
Some things you can explore:
- 💪 Strong event ordering – See how events can be stored and retrieved in a strict sequence.
- 🍀 Optimistic concurrency – Learn how to handle concurrent writes without conflicts.
- ⌛ Manage eventual consistency – Experiment with tracking seen event revisions for CQRS read models.
- 🗄️ Built on DynamoDB – Understand the trade-offs of using a NoSQL database for event sourcing.
- 🚀 Easy deployment – Use the AWS CDK construct to quickly set up an event store in your own AWS account.
Aeon isn’t production-ready. It’s a playground for learning and experimenting with event-driven patterns. If you’re exploring event sourcing and want to see how these ideas work in practice, give it a try!
- 🤨 counter-basic - A basic event sourced counter with a command API to increment & decrement counters, and a query API that answers queries inefficiently by replaying a counter's entire event history.
- 😊 counter-cqrs - builds on counter-basic by adding a separate, optimized read model and a new query API that answers queries using the read model.
- 😇 counter-cqrs-lazy - similar to counter-cqrs, but uses a lazy read-through (pull) strategy to update its read model instead of a subscription (push) strategy.
- 😁 counter-optimistic-concurrency - builds on counter-cqrs by adding a new command handler that uses optimistic concurrency control to ensure counter events are only appended when their history hasn't changed.
- 🥳 counter-snapshot - builds on counter-optimistic-concurrency by adding a new command handler that uses snapshots to update a counter without needing to read its entire history.
- 🍦 event-sourcing-diy - ice cream truck example from The Dev Owl's Event Sourcing DIY YouTube series
To deploy an example into your AWS account
- You'll need:
- Clone the repo
npm install
cd examples/<example to deploy>
npx cdk deploy --all
To remove a deployed example from your AWS account
cd examples/<example to deploy>
npx cdk destroy --all
The best way to learn the API is to look through the examples.
There are really two APIs:
- Software API (TypeScript aws-sdk) - used to implement your application, i.e. reading and appending events in the course of implementing your business logic, read models, etc.
- Infrastructure API (TypeScript aws-cdk) - used to deploy your infrastructure and applicaton, i.e. creating and deploying a DynamoDB event store in AWS, etc.
- Greg Young - Event Sourcing - GOTO 2014
- In-Depth Look at Event Sourcing with CQRS Architecture & Design • Sebastian von Conrad • YOW! 2017
- Kurrent - Event-native platform for event sourcing