Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PostgreSQL notifications and WebSockets with Rails

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.

like image 707
fjsj Avatar asked Nov 03 '22 02:11

fjsj


1 Answers

I don't know directly about any that does work with websockets, but queue_classic gem uses listen/notify in postgres for a message queueing. It's a good way to start looking how it can be done.

like image 175
johno Avatar answered Nov 15 '22 04:11

johno