Earlier quoted context omitted.
Is the main use case for this for languages that only have access to process based concurrency? Struggling to see why you would otherwise need this in java/go/clojure/C# your sqlite has a single writer, so you can notify all threads that care about inserts/updates/changes as your application manages the single writer (with a language level concurrent queue) so you know when it's writing and what it has just written.…
He mentions Litestream, maybe this also works for litestream read-only replicas which may be in completely different locations?
Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite
41–50 of 95 posts
Re: Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite
#42Earlier quoted context omitted.
For one it seems to be deprecated.
It's not.
Re: Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite
#43Hey HN, I built this. Honker adds cross-process NOTIFY/LISTEN to SQLite. You get push-style event delivery with single-digit millisecond latency without a damon/broker, using your existing SQLite file. A lot of pretty high-traffic applications are just Framework+SQLite+Litestream on a VPS now, so I wanted to bring a sixer to the "just use SQLite" party. SQLite doesn't run a server like Postgres, so the trick is movin…
Pretty cool! I have a half baked version of something similar :) Can you use it also as a lightweight Kafka - persistent message stream? With semantics like, replay all messages (historical+real time) from some timestamp for some topics? As with pub/sub, you can reproduce this with some polling etc but as you say, that's not optimal.
Re: Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite
#44Re: Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite
#45Earlier quoted context omitted.
Breaks cross-platform, specifically Macs swallow silently. stat just works
I don't believe this to be true.
Re: Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite
#46kqueue/FSEvents is tempting here, but Darwin drops same-process notifications. If you've got a publisher and listener in the same process the listener just never fires. Nasty thing to chase. stat polling looks gross but it's the only thing that actually works everywhere. What happens on WAL checkpoint? When the file shrinks back, does that trigger a wakeup, or does the poller filter size drops?
Re: Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite
#47Earlier quoted context omitted.
He mentions Litestream, maybe this also works for litestream read-only replicas which may be in completely different locations?
Whoa I really hadn’t considered this. Do a litestream read replica, trigger across machines with S3 as the broker essentially. But you’re still stuck with the litestream sync interval. Maybe interesting for cross server notify?
Re: Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite
#48Earlier quoted context omitted.
I don't believe this to be true.
See comment below - Darwin silently drops same-process notifs. I could change the behavior depending on same vs cross process and platform but I wanted to”just one thing to worry about”. Potentially a good optimization later. Would help reduce syscalls.
Re: Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite
#49Hey HN, I built this. Honker adds cross-process NOTIFY/LISTEN to SQLite. You get push-style event delivery with single-digit millisecond latency without a damon/broker, using your existing SQLite file. A lot of pretty high-traffic applications are just Framework+SQLite+Litestream on a VPS now, so I wanted to bring a sixer to the "just use SQLite" party. SQLite doesn't run a server like Postgres, so the trick is movin…
I love the name!
Re: Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite
#50Earlier quoted context omitted.
Whoa I really hadn’t considered this. Do a litestream read replica, trigger across machines with S3 as the broker essentially. But you’re still stuck with the litestream sync interval. Maybe interesting for cross server notify?
I guess the idea is to have all writes go through a central server with local read replicas for improved read perf. The default litestream sync interval is 1s. I bet many use-cases would be satisfied with a few seconds delay for cross-region notifications.