3 ms·
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
by BrickTamblan 3y ago
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.