https://github.com/briancavalier/aeon
Serverless Event Store built on AWS DynamoDB
https://github.com/briancavalier/aeon
cqrs event-driven event-driven-architecture event-sourcing event-store
Last synced: 2 months ago
JSON representation
Serverless Event Store built on AWS DynamoDB
- Host: GitHub
- URL: https://github.com/briancavalier/aeon
- Owner: briancavalier
- License: mit
- Created: 2025-01-19T22:10:18.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-04-06T01:58:11.000Z (2 months ago)
- Last Synced: 2025-04-06T02:31:22.322Z (2 months ago)
- Topics: cqrs, event-driven, event-driven-architecture, event-sourcing, event-store
- Language: TypeScript
- Homepage:
- Size: 500 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Aeon - Event Sourcing with DynamoDB
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!
## Examples
1. π€¨ [counter-basic](examples/counter/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.
1. π [counter-cqrs](examples/counter/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.
1. π [counter-cqrs-lazy](examples/counter/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.
1. π [counter-optimistic-concurrency](examples/counter/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.
1. π₯³ [counter-snapshot](examples/counter/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.
1. π¦ [event-sourcing-diy](examples/event-sourcing-diy/) - ice cream truck example from [The Dev Owl](https://www.youtube.com/@TheDevOwl)'s [Event Sourcing DIY YouTube series](https://www.youtube.com/watch?v=zyp9pZ7jeK8&list=PL-nSd-yeckKh7Ts5EKChek7iXcgyUGDHa)### Deploying examples
To deploy an example into your AWS account
1. You'll need:
1. [An AWS account and AWS command line credentials setup](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html#getting-started-quickstart-new)
2. [NodeJS >= 22.12.0 or higher](https://nodejs.org/en/download)
1. Clone the repo
2. `npm install`
3. `cd examples/`
4. `npx cdk deploy --all`### Destroying (undeploying) examples
To remove a deployed example from your AWS account
3. `cd examples/`
4. `npx cdk destroy --all`## API
**The best way to learn the API is to [look through the examples](#examples).**
There are really two APIs:
1. 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.
2. Infrastructure API (TypeScript aws-_cdk_) - used to deploy your infrastructure and applicaton, i.e. creating and deploying a DynamoDB event store in AWS, etc.## Resources & Inspirations
* [Greg Young - Event Sourcing - GOTO 2014](https://youtu.be/8JKjvY4etTY?si=wAnuTauSWKitKhWe)
* [In-Depth Look at Event Sourcing with CQRS Architecture & Design β’ Sebastian von Conrad β’ YOW! 2017](https://youtu.be/8eNhJPjZSsY?si=N__A8_BORbzCCoXc)
* [Kurrent](kurrent.io) - Event-native platform for event sourcing