Show HN: Light implementation of Event Sourcing using PostgreSQL as event store

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. postgresql-event-sourcing

    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...>

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. commanded

    Use Commanded to build Elixir CQRS/ES applications

    This reminds me of Commanded[0] for elixir which also uses Postgresql by default.

    [0]https://github.com/commanded/commanded

  4. message-db

    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

  5. ksqldb-event-souring

    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.

  6. txid-syncing

    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.

    I have a mind to do a proper writeup, but at least there is code at https://github.com/cognitedata/txid-syncing (MIT-licensed) and a presentation at https://vimeo.com/747697698

    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)

  7. Marten

    .NET Transactional Document DB and Event Store on PostgreSQL

    Check out Marten for a fully fleshed out implementation https://github.com/JasperFx/marten

  8. sirix

    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[1] 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).

    [1] https://sirix.io | https://sirix.io/docs/concepts.html

  9. eventstoredb-event-sourcing

    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>.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • 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

Did you know that Java is
the 8th most popular programming language
based on number of references?