4 ms·
Yesterday I learned about Postgres' LISTEN/NOTIFY functionality. I'm not sure about your architecture, or how many listeners/watchers Posgres supports, but it m
by yesbabyyes 14y ago
Yesterday I learned about Postgres' LISTEN/NOTIFY functionality. I'm not sure about your architecture, or how many listeners/watchers Posgres supports, but it might be that you can just listen to changes in your database -- that might be the most lightweight solution.
Edit: Here is a small tutorial: http://bjorngylling.com/2011-04-13/postgres-listen-notify-with-node-js.html http://bjorngylling.com/2011-04-13/postgres-listen-notify-wi...
- meaty 14y agoIf you're trading, keep it all out of the database. It won't scale and latency is terrible and unpredictable regardless of the engine. Keep the database for storing stuff that you don't need in ram. Keep the rest in ram and message queuing/pubsub bus architecture. Plus events in a database engine are a pain in the butt to write tests against.