postgresql-event-sourcing
Dev tools
event sourcing reference implementation
SHOW HN2023
postgresql-event-sourcing
Light implementation of Event Sourcing using PostgreSQL as event store
github.comHow HN took it
6 positive, 7 neutral or asking, 0 mixed, 5 critical, out of 18 comments about the project. Thread score +0.03.
Docs: 4 for, 1 againstIdea: 0 for, 3 againstDesign: 1 for, 0 againstExecution: 0 for, 1 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Comprehensive, in-depth README covering PostgreSQL internals and gotchas
From 3 comments
While I haven't kept up to date with Event Sourcing, the README referenced is a surprisingly in-depth tour of Postgresql functionality and internals, and typical relational…
wvh on HNAgreed - perhaps the most comprehensive README I've ever seen.
quercusa on HNHave to say this is a great resource. I've been using it to discuss how my team could understand and build a similar implementation to this using Golang+Postgres. It provided a…
NomDePlum on HN
Illustrations are outstanding
From 1 comment
The illustrations are outstanding.
whalesalad on HN
Objections
Event ID sequence ordering can cause lost events for subscribers
From 1 comment
Using only the event ID to track events processed by the subscription is unreliable and can result in lost events. The ID column of the ES_EVENT table is of type BIGSERIAL. It's…
reese_john on HN
Missing license information
From 1 comment
It appears to be missing any licensing information
mdaniel on HN
Requests
Add a license
From 1 comment
Thanks for noticing. I will add Apache License 2.0.
eugene-khyst on HN
Use readOnly transactions for read methods
From 1 comment
I noticed that you use the @Transactional annotation on class definition. This will create a write transaction for every public method of the annotated class, including read only…
koevet on HN
Questions
How is current state rolled up from events into a read model
From 1 comment
How do you roll the history up into the current state? I get the idea, but where is the actual code or query that does this? Especially how do you make an up to date read model…
lacrosse_tannin on HN
How to handle events logged out of order
From 1 comment
This seems as good a place to ask as any. I've become interested in event sourcing because of a problem it might help with. Essentially, we have a system where users can log…
globular-toast on HN
Alternatives named
Audit tables and temporal tables
From 3 comments
Using audit tables is another approach that avoids rolling up the data periodically, and you avoid all the needless complexity this approach can introduce; particularly if you're…
mickeyp on HN> You gain temporal querying with a history/audit table that mirrors the main one (or not -- if you prefer not to, and instead want to cram everything into a jsonb column). I…
KronisLV on HNI love temporal tables. I built an implementation in Postgres [1] in a few hundred lines of PLPGSQL. We've run the implementation for several years across a few hundred tables…
sa46 on HN
EventStoreDB
From 2 comments
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…
eugene-khyst on HN- The maker's post
Marten
From 1 comment
Check out Marten for a fully fleshed out implementation https://github.com/JasperFx/marten
jchannon on HN
Commanded
From 1 comment
This reminds me of Commanded[0] for elixir which also uses Postgresql by default. [0]https://github.com/commanded/commanded
conradfr on HN
message-db
From 1 comment
In addition to the alternatives mentioned, here’s another Postgres-only ES implementation: https://github.com/message-db/message-db
Nelkins on HN
Debezium transaction log tailing
From 1 comment
> I actually think this dual use-case is something we can really improve upon. In some fever-dream what I think I want is some combination of Kafka (append-only event stream) and…
marwis on HN