6

I'm trying to write a Rails 3 application in which a server can push data to multiple clients in real time.

I've heard of Juggernaut, but I've also heard that it does not work with Rails 3. I tried APE (AJAX Push Engine), but I'm not having much luck with it.

I'm very new to Rails. I can't find many guides that involve real-time push, and Rails 3. I was looking for a free, easy (if possible) solution to this. If anyone could point me in the right direction, I'd greatly appreciate it.

Derek
  • 61
  • 1
  • 2
  • 1
    If you'll be using Faye, this [railscast](http://railscasts.com/episodes/260-messaging-with-faye) might come in handy. – jhoanna Sep 03 '12 at 09:23

5 Answers5

5

Check out Faye: http://faye.jcoglan.com/ - I hear really good things about it.

if you're looking for a hosted solution, i've used Pusher http://pusher.com/ in the past, and loved it. i converted a site that used ajax polling over to pusher in about 30 minutes.

Derick Bailey
  • 69,055
  • 21
  • 193
  • 207
1

You can try juggernaut to do what you want.

The github repository : https://github.com/maccman/juggernaut Example of application with juggernaut : https://github.com/maccman/holla

Enjoy :)

Awea
  • 3,128
  • 8
  • 37
  • 59
  • @agmcleod i want to use it in my next app :) it's hard to make it work ? – Awea Sep 12 '11 at 13:35
  • Nah, it's reasonably straight forward. Just need to launch the juggernaut and redis processes. Then make sure your rails app is setup to work with it. The documentation on the github repo worked pretty well for me. – agmcleod Sep 13 '11 at 21:34
  • @agmcleod thanks for the tips and if i have some problem answer to my question in the future :p – Awea Sep 13 '11 at 21:46
0

Starting with Rails 4, you could also use Entangled:

https://github.com/so-entangled/rails

It basically keeps all data between client and server in sync in real time through web sockets. It's easy to set up, so give it a try.

weltschmerz
  • 12,320
  • 9
  • 57
  • 109
0

Have you looked into http://socket.io ? It powers the push functions behind Juggernaut, if I recall correctly.

There appears to be a library for Rails here: https://github.com/markjeee/Socket.IO-rack -- it says 2.3+, which I assume means 3 is ok (though I'm not a Ruby guy, so I wouldn't really know).

Paddy
  • 2,605
  • 1
  • 18
  • 27
0

In keeping with the Pusher suggestion, there's RMSN - a drop in replacement I've written using NowJS. https://github.com/leppert/RMSN

leppert
  • 805
  • 9
  • 11