Want to stay on top? Ruby Weekly is a once-weekly e-mail newsletter covering the latest Ruby and Rails news.
     Feed Icon

Juggernaut: Real-time socket connection between your Rails views and your app

By Peter Cooper / July 20, 2006

Juggernaut

Alex MacCraw has been working on a great plugin called Juggernaut, and has now made his first public release:

The Juggernaut plugin for Ruby on Rails aims to revolutionize your Rails app by letting the server initiate a connection and push data to the client. In other words your app can have a real time connection to the server with the advantage of instant updates. Although the obvious use of this is for chat, the most exciting prospect is collaborative cms and wikis.

Basically, your view will contain a hidden piece of Flash that opens up a socket connection to a socket server that your Rails app can then interact with. This means you can easily 'push' data in real time to your views and have it update in real time too.

The most obvious use is for making a chat system. Whenever someone in your channel posts a message, simply push it to the socket server, which then pushes the message out to all of the listening clients updating their chat pages in real-time. It uses Flash 6, and has been tested on Firefox, IE, and Safari.

I'm very excited to see how this gets used. Alex envisions real-time updating wikis and collaborative CMSes.

Comments

  1. Danno says:

    Ewww, Flash.

  2. James Hughes says:

    This was demonstrated by DHH at the Canada on Rails conference in April. (He called it 'Armageddon') Were you there or did you somehow come up with this completely independently of that?

  3. _ugly says:

    honestly, who really cares if it's flash. this is frickin sweet!

  4. Peter Cooper says:

    Alex told me that he was inspired by that but it was supposedly unfinished and he wanted something slick and ready for production. Hence, Juggernaut.

Other Posts to Enjoy

Twitter Mentions