News for hackers. Stuff that matters.
Re:Million User Webchat with Full Stack Flux, React, Redis a... by Erwin on Monday February 16, 2015 @09:24AM (#9056997)
Your database connection is just a socket, so you can add that file descriptor to the set of file descriptors you are waiting IO on, if you are using a classic select/poll based system. See an example in the pscyopg2 docs here: http://initd.org/psycopg/docs/advanced.html#asynchronous-not...

Once that FD is active, you call the poll() method and your notify payload becomes available to you.

Re:Million User Webchat with Full Stack Flux, React, Redis a... by fauigerzigerk on Monday February 16, 2015 @09:40AM (#9057062)
You are right. It seems that this was an issue with older versions of libpq: "In prior releases of libpq, the only way to ensure timely receipt of NOTIFY messages was to constantly submit commands" http://www.postgresql.org/docs/9.4/static/libpq-notify.html