I would like to create a communication API between my website which was built using rails and another website, so I can send data from my database to there website. So my idea is to use node.js where I will create real-time, so it will work in the following procedure. My Database is connected to rails, rails will send it to redis and then redis will send it to node finally node will send it to the other website using socket.IO
The question: Is that valid? Is there easier way?
I don't think that is a good way You should consider lowering your dependency chain (DB -> Rails -> Redis -> node -> client) Is redis necessary? (you can connect node to your DB, if you need realtime) And if you don't need a realtime system, consider using http instead, you can return any type in rails (your own json, html, ...)
Use just rails, create a controller and action that returns a json.
You can use https://github.com/rails-api/rails-api to speed things up.