zeroeventhub
mssql-changefeed | zeroeventhub | |
---|---|---|
4 | 2 | |
14 | 13 | |
- | - | |
6.6 | 6.7 | |
5 months ago | 5 months ago | |
Go | Python | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
mssql-changefeed
-
How to Listen to Database Changes Using Postgres Triggers in Elixir
We made mssql-changefeed for this purpose:
https://github.com/vippsas/mssql-changefeed
V1 requires to run a sweeper procedure in the background, but an upcoming v2 version does without the sweep loop. Unfortunately too fresh for readme to be updated, but relevant lines in tests to show it off:
https://github.com/vippsas/mssql-changefeed/blob/v1-lazy/go/...
https://github.com/vippsas/mssql-changefeed/blob/v1-lazy/go/...
https://github.com/vippsas/mssql-changefeed/blob/v1-lazy/go/...
Library itself:
https://github.com/vippsas/mssql-changefeed/blob/v1-lazy/mig...
-
Push-Based Outbox Pattern with Postgres Logical Replication
Not OP, but there is an approach here of using a dedicated loop worker to assign post-commit ID sequence. I.e. using the outbox pattern once, simply to assign a post-commit ID.
https://github.com/vippsas/mssql-changefeed/blob/main/MOTIVA...
I wish DBs had this more built in, it seems a critical feature of a DB these days and the commit log already have very similar sequence numbers internally...
-
The Next Generation of Materialize
We do something similar, but in 2), instead of using the outbox pattern, we make use (in several different settings) of integers that are guaranteed to increment in commit order, then each consumer can track where their cursor is on the feed of changes. This requires some more coordination but it means that publishers of changes don't need one outbox per consumer or similar.
Then you can have "processes" that query for new data in an input table, and update aggregates/derived tables from that simply by "select * ... where ChangeSequenceNumber > @MaxSequenceNumberFromPreviousExecution"...
The idea here implemented for Microsoft SQL for the OLTP case:
https://github.com/vippsas/mssql-changefeed
zeroeventhub
-
Push-Based Outbox Pattern with Postgres Logical Replication
The author says the outbox pattern should "always" be used.
I agree with the goal -- one should definitely never publish an event externally before it is committed to DB! But I think using a "post-commit sequence number" is even more powerful than the outbox pattern.
Sadly few DBs seems to supoort this well with low latency. CosmosDB has great support for a post commit low latency change feed
A hack for mssql is here:
https://github.com/vippsas/mssql-changefeed/blob/main/MOTIVA...
More about this way of publishing events:
https://github.com/vippsas/zeroeventhub
- ZeroEventHub: Broker-less event streaming over HTTP
What are some alternatives?
marmot - A distributed SQLite replicator built on top of NATS
supavisor - A cloud-native, multi-tenant Postgres connection pooler.
rust-postgres - Native PostgreSQL driver for the Rust programming language
pgcat - PostgreSQL pooler with sharding, load balancing and failover support.
rust-postgres - Native PostgreSQL driver for the Rust programming language
postgrex_pubsub - A helper to turn postgres mutations into a pubsub channel
risingwave - SQL stream processing, analytics, and management. PostgreSQL simplicity, unrivaled performance, and seamless elasticity. 🚀 10x more productive. 🚀 10x more cost-efficient.
walex - Postgres change events (CDC) in Elixir
ksql - The database purpose-built for stream processing applications.