Is there any Ruby/Rails library for sending PostgreSQL asynchronous notifications via WebSockets?
I need to notify a browser client for updates in a specific database table. I know this can be done with pub/sub APIs, but I'm looking for a Postgres only solution.
I've found a Python tutorial for this, but couldn't find one for Ruby. I need to implement this for production use, so a production-ready library and tutorial would be the best.
EventMachineplugin for websockets and you can use Model.execute() to listen/notify. Only thing you have to bare in mind is that MRI is not multithreaded (look for GIL), so I used jruby instead of MRI for the websockets server.