Show HN: Liftbridge – Lightweight, fault-tolerant message streams
liftbridge.io
liftbridge.io
"Liftbridge was designed to bridge the gap between sophisticated but complex log-based messaging systems like Apache Kafka and Apache Pulsar and simpler, cloud-native solutions. There is no ZooKeeper or other unwieldy dependencies, no JVM, no complicated API or configuration, and client libraries are just gRPC. More importantly, Liftbridge aims to extend NATS with a durable, at-least-once delivery mechanism that upholds the NATS tenets of simplicity, performance, and scalability. Unlike NATS Streaming, it uses the core NATS protocol with optional extensions. This means it can be added to an existing NATS deployment to provide message durability with no code changes. The ultimate goal of Liftbridge is to provide a message-streaming solution with a focus on simplicity and usability."
Part 1, Storage Mechanics: https://news.ycombinator.com/item?id=15983185
Part 2, Data Replication: https://news.ycombinator.com/item?id=16021876
Part 3, Message Delivery: https://news.ycombinator.com/item?id=16101223
Part 4, Trade-offs and Lessons: https://news.ycombinator.com/item?id=16181963
Part 5, Sketching a New System: https://news.ycombinator.com/item?id=16215788
For anyone looking for something similar, we are adding streams to Postgres - https://github.com/supabase/realtime
It isn’t an exact comparison but it has some of the features you see here too - you can use wildcards listen to: all changes in your database, schema-level, table-level changes, or row-level. The server is built with Elixir, so you can have thousands of listeners connected via web sockets.
It’s not as lightweight as OP’s solution but PG is very familiar.
- set up elixir clustering (i.e. autoscaling)
- run benchmarks
- fine-grained client auth
- ability to listen to multiple databases
> then build a real-time data warehouse really easilyThis is the nice thing about PG. It's an operational database that can handle the load of an analytics database. Easy choice! If you need a hand trying this out, message me: copple [at] supabase.io
Looking at Akka Streams, it appears to be more in line with Liftbridge, though I'm not totally sure. Liftbridge (like Kafka), is a message log, so messages do not get acked or removed from a stream (unless removed due to retention limits or compaction). I'm not sure if that's the case with Akka Streams.
I'm curious what your needs are around exactly-once delivery. From what I can tell, Akka only supports at-least-once semantics and is of the opinion that exactly-once isn't really possible as such (which is an opinion I agree with, but that's a more nuanced discussion). https://www.lightbend.com/blog/how-akka-works-exactly-once-m...
https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.h...
Bear in mind that there are always limits in how guaranteed a "guaranteed delivery" actually is. "Exactly once" means that the broker has received it and the client has acknowledged that. What happens beyond the broker is outside the scope of the protocol and would have to be handled at the application level, eg using transaction ids, etc.
- Written in Go rather than Java/Scala (big benefit here IMO is getting a small static binary rather than having to run a JVM)
- Doesn't rely on Zookeeper
- Is integrated with NATS (can extend NATS with Kafka-like semantics, but in the future will allow for abstracting NATS away entirely)
- Uses gRPC for its API
- Supports "wildcard topics" - e.g. a stream can listen to the topic "foo.*" and will receive messages published on "foo.bar", "foo.baz", "foo.qux", etc.
- Allows for streams to be paused and subsequently resumed automatically when published to - on the roadmap is "auto-pausing" of sparsely used streams
- Exposes an activity stream that allows you to respond to events such as streams being created, deleted, paused, etc.
One advantage Kafka currently has is its consumer groups, which are on the roadmap for Liftbridge but not implemented yet.
There's a more complete comparison available here: https://liftbridge.io/docs/feature-comparison.html
For instance, it sounds like it's a cluster-based distributed system for some clients to post messages and other clients to get notified about them through pattern matching on a standardized protocol, without any messages getting lost.
Longer term, I'd like to take advantage of the recent work in NATS around superclusters and geo-aware subscribers to provide better geo-replication primitives directly inside Liftbridge (https://www.slideshare.net/nats_io/deploy-secure-and-scalabl...).
Is it PROD ready? are there any use-cases or project sizes this utility is NOT recommended for? i.e. sensitive events such as payment or ecomm related vs. web traffic noise logs