A reference implementation of an event-sourced system that uses PostgreSQL as an event store built with Spring Boot. Fork the repository and use it as a template for your projects. Or clone the repository and run end-to-end tests to see how everything works together.
Here is the code <https://github.com/eugene-khyst/postgresql-event-sourcing/bl...>
Use Commanded to build Elixir CQRS/ES applications
This reminds me of Commanded for elixir which also uses Postgresql by default.
ChatGPT with full context of any GitHub repo. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at app.getonboardai.com.
Microservice native message and event store for Postgres
I’m addition to the alternatives mentioned, here’s another Postgres-only ES implementation: https://github.com/message-db/message-db
Discontinued Kafka is not for event sourcing, isn't it? Kafka alone is not an event store, but Kafka and ksqlDB together allow building full-featured event stores. This repository provides a sample of event sourced system that uses Kafka and ksqlDB as event store.
I tried to evaluate Kafka usage for event sourcing: <https://github.com/eugene-khyst/ksqldb-event-souring>. More out of curiosity. But never tried it in production.
Demo of continuous syncing based on txids
Nice job, eugene-khyst. Looks very comprehensive from an initial skim.
I've worked on something in the same space, with a focus on reliable but flexible synchronization to many consumers, where logical replication gets impractical.
The README mentions …
> A long-running transaction in the same database will effectively "pause" all event handlers.
… as the approach is based on the xmin-horizon.
My linked code works with involving the MVCC snapshot's xip_list as well, to avoid this gotcha.
Also, note that when doing a logical restore of a database, you're working with different physical txids, which complicates recovery. (So my approach relies on offsetting the txid and making sure the offset is properly maintained)
.NET Transactional Document DB and Event Store on PostgreSQL
Check out Marten for a fully fleshed out implementation https://github.com/JasperFx/marten
SirixDB is an an embeddable, bitemporal, append-only database system and event store, storing immutable lightweight snapshots. It keeps the full history of each resource. Every commit stores a space-efficient snapshot through structural sharing. It is log-structured and never overwrites data. SirixDB uses a novel page-level versioning approach.
I'm working on an append-only (immutable) (bi)temporal DBS in my spare time, which transforms CRUD operations into an event store, automatically providing an audit log for each stored node, while the nodes are stored with immutable node-IDs, which never change. As the contents stored are based on a custom binary JSON format also a rolling hash can optionally be built, to check if a whole subtree has changed or not.
The system uses persistent index data structures to share unchanged pages between revisions.
The intermittant snapshots are omitted. Rather the snapshot is spread over several revisions, applying a sliding snapshot algorithm on the data pages (thus, avoiding write peaks, while at max a predefined number of page fragments has to be read in parallel to reconstruct a page in-memory).
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Discontinued EventStoreDB is the database for Event Sourcing. This repository provides a sample of event sourced system that uses EventStoreDB as event store.
I can definitely recommend EventStoreDB. I used it in production and most colleagues like this DB. I have a sample Java Spring Boot + EventStoreDB project <https://github.com/eugene-khyst/eventstoredb-event-sourcing>.
Show HN: Light implementation of Event Sourcing using PostgreSQL as event store
1 project | /r/hackernews | 2 Nov 2023
Hitchhiker's Guide to Moving from Relational Data to Events
4 projects | news.ycombinator.com | 16 Dec 2023
Ensuring uniqueness in Marten event store
2 projects | /r/csharp | 27 Mar 2023
Event Store State of the Art
1 project | /r/dataengineering | 23 Mar 2023
Practical Samples and Tutorials of Event Sourcing in .NET
2 projects | /r/dotnet | 20 Oct 2022