News for hackers. Stuff that matters.
Re:Postgres as Queue by BrickTamblan on Saturday February 10, 2024 @12:42PM (#39328334)
I’m not sure if this is the same as pg queues but I just started using pg_notify with channels, and it’s so good.

Row update occurs as normal express api, but at the end I call pg_notify on some channel name. I pickup the message in a new thread via polling, and perform aggregate queries to a agg table. It’s like materialized views, but with no wasteful refreshes. Then I push the updates aggs back to the frontend via websockets.

There are no comments on this comment yet.