I am currently using rails to serve static web pages and I am experimenting with NodeJs to handle some real time aspect of my application.
I have been able to have do a one way communication between Nodejs to my Rails server by having Nodejs write to a db and my rails server reading from it.
Now I want to do the other way, aka an action in Rails will trigger an action in Nodejs. Obviously I can be dumb and have a node continually polling the database server.
What are my options?
- Set up RPC calls between both
- Set up a TCP socket both ways
Are there easier/quicker options?