Best Ruby on Rails WebSocket tool

Jero Toryaki picture Jero Toryaki · Jan 22, 2011 · Viewed 54.7k times · Source

I started project in Rails 3 and I need to add notifications(like Facebook one). Best way would be using WebSocket for support devices like iPad, but I can't find any good tools to easy implement it in Rails. I found Pusherapp, but they prices are overwhelming, and also I don't think that providing my data to third party company would be wise. So things needed:

  • Open Source
  • Some kind of channels support
  • Helpers for Rails(and working with Rails 3)

Answer

Bernard Potocki picture Bernard Potocki · Jan 22, 2011

If you are searching plain WebSocket implementation, then EM-WebSocket is probably best. If you want support for non-flash fallback(like old phones or iPhone 3G) you should try Socket.IO-rack.

For full-featured implementations like Pusher(with authentication and channels) you have two opensource choices: Socky and Juggernaut.

Socky is a pure ruby project using EM-WebSocket(like pusher) and it has some nice tools for Rails. On the other hand Juggernaut has more history(and more users atm.) but the new version was rewritten to Node.JS(client is still ruby-based) and require Redis. Both should work fine.