by andrenotgiant · 4y ago · 0 comments
The share of discourse on HN about PostgreSQL, SQL, and Databases is growing noticeably. [0] I, for one, hope we are seeing the pendulum swing back from code-centric architectures and NoSQL to a new golden age of data-centric architectures.
Next you need push and pub/sub semantics in PostgreSQL so you can build something like this [1]
[0] https://toddwschneider.com/dashboards/hacker-news-trends/?q=... [1] https://tonsky.me/blog/the-web-after-tomorrow/
On top of this library you can do all sorts of things: replicate data to Kafka or SQS, write a web socket server to publish changes to clients, etc.
It's fairly basic (then again, does it need to be more?), but NOTIFY exists: https://www.postgresql.org/docs/current/sql-notify.html
All you need to do is map JWT to a Phantom DB User in PostgreSQL, then you can query SQL directly from the browser.
[0]: https://www.postgresql.org/docs/10/logical-replication.html