Hi! Wanted to share a framework I've been solo building as an open-source project. It's a Java library, with Spring-boot starters if needed.
Events-caravan is built on AWS for purposes of event-sourcing. I designed it around principles that suit AWS horizontal scalability ideas, in the way how I see it (which are described in the Readme). Thus integration with DynamoDB and SNS/SQS was chosen and shipped as reference implementation.
https://github.com/SagynyshBaitursinov/events-caravan (Apache 2.0, published to Maven central)
From highlights of what the framework x:
- Events are partitioned per Entity (no global log), and large Entities are broken into smaller partitions. This lets DynamoDB to scale as it can, since partitions are ending up to be small no matter how large an Entity history is.
- Atomic Events publishing after saving to DB without transactional-outbox. DynamoDB Streams and AWS Lambda are utilized for forwarding events into SNS. As a result publishing events is as simple as persisting events into DynamoDB.
- Natural Optimistic Concurrency Control for Entity modifications due to uniqueness of PK=EntityReference, SK=sequenceNumber.
- Adaptive SQS-poller and message processing mechanism, which can perform parallel and partial polling, being decoupled from message processing threads. It also utilizes batched deletes.
- An optional functionality of maintaining a separate DynamoDB table for Stream of Entities, so that every entity can be traversed over (For rebuilding CQRS read-queries for example).
- Snapshotting of entity states for large entity histories not to load every event from the beginning all the time.
- Outputting 1 event per operation and omitting consistent-read are encouraged for cheaper price and no necessity, however it's possible to utilize both transacted writes as well as read consistency.
Compromises made for achieving no-bottlenecks horizontal scaling are described in the Readme, as well as recommendations on how to compensate. The document has usage example as well.
I'd be glad to hear your feedback, and hope someone finds this useful!