pg-sse
Personal project · Python · Postgres · MIT licence
Live updates from the Postgres you already run, sent as server-sent events. No Redis, no broker, no WebSocket service. Starlette and FastAPI built in.
- How it works
- A table trigger sends NOTIFY with only a key; one listener per process wakes the open streams, and each re-reads from its own cursor. A notification never carries the data, so a lost one costs a delay, never an event.
- Trade-offs
- LISTEN needs a direct connection, not a transaction-mode pooler. Keeping ids in commit order serialises inserts per key. Limits and in-memory signals are per process.