Reputation: 456
I need to implement real time notification feature in my rails app. Can anybody tell me what are possible good ways to implement this feature?
One of my colleague suggested me to go with node.js and redis. Is it the right way to proceed for this feature.
Thanks in advance.
Upvotes: 1
Views: 2111
Reputation: 4293
Take a look at Private Pub. It's a Ruby gem that makes use of a publish/subscribe system called Faye.
You set up client-side message handlers in Javascript that listen to particular channels. Then, from the Rails side of things, you can publish messages to those channels. The messages are picked up effectively in "real time" back on the client side.
It's been working wonderfully for me; I'd strongly suggest anyone giving it a try.
Upvotes: 3
Reputation: 23354
For real time notifications try Pusher.
If you get any notifications like a new message
then you can go on to setup a handler at client side. Likewise on the server side, you can tell pusher to notify
for a message to any client that you want typically the one that sends the notifications.
Upvotes: 0