Juggernaut Released - (a.k.a Armageddon)

I’ve just released Juggernaut - a plugin for ruby on rails.
Check out the site: http://juggernaut.rubyforge.org

Iâ??ve also finished a demo that illustrates some of Juggernuatâ??s
capabilities. You can sign up for an account here:
http://alexmaccaw.no-ip.info:3500/login/sign_up . It might be a tad slow
as itâ??s running from my home machine.

Juggernaut for Ruby on Rails initiates a flash xmlsocket between server
and browser allowing real time communication between the two. This opens
the door to all sorts of functionality such as chats and collaborative
wikis/cms. The open socket connection allows the server to ‘push’ base64
encoded javascript to the browser which is subsequently decoded and
evaluated.

What Happens:

  1. Client A opens socket connection to the socket server
  2. Client B makes Ajax call to Rails
  3. Rails sends message to the socket server
  4. Socket server broadcasts message to clients

Juggernaut Features:

* Allows a real time connection with a client - Rails can literally 

push javascript in real time to the client which is then evaluated.
* Push server - written in Ruby.
* Integrated, as a plugin, into Rails.
* Subscribers can subscribe to multiple channels, and broadcasters
can broadcast to multiple channels. Channels are sent as a base64
encoded array - from the session.
* Uses Flash 6 - installed on more than 95% of computers.
* Supports all the major browsers (uses fscommand): Firefox 1+, IE
6+ and Safari 2+.

Requirements:

* Rails 1.1+
* json gem (gem install json)

Feedback would be very welcome.

On Jul 20, 2006, at 12:49 AM, Alex MacCaw wrote:

Very cool Alex. I’ll definitely play with this :wink:

-Ezra

What special server configuration is required for Juggernaut?

Thanks,
Peter

On 7/20/06, Peter M. [email protected] wrote:

What special server configuration is required for Juggernaut?

I should reword this as you said Rails 1.1 and json gem…

Juggernaut does not need twisted or anything fancy on the server?

Thanks,
Peter

Peter M. wrote:

On 7/20/06, Peter M. [email protected] wrote:

What special server configuration is required for Juggernaut?

I should reword this as you said Rails 1.1 and json gem…

Juggernaut does not need twisted or anything fancy on the server?

Thanks,
Peter

No - Juggernaut doesn’t apart from a push server (included) - which
manages subscribed users. You can’t make everything part of rails as
rails uses Fast CGI so can’t handle the long lived connections that
Juggernaut implements. The push server is made in ruby.

Alex MacCaw wrote:

I’ve just released Juggernaut - a plugin for ruby on rails.
Check out the site: http://juggernaut.rubyforge.org

This is definately a cool, cool project. Back when I use to work with
Flash a little more I realized how powerfull it actually is when used by
an experienced person, just like Alex has shown here.

However, what I predicted would hinder Flash was the way it was being
used for these online ads that flash, flicker, move, beep, etc. You see
them EVERYWHERE and they are annoying. So much so that a lot of people
use things like Flash Blocker or other tools. If it wasn’t for
Homestarrunner.com I wouldn’t even have Flash installed. This is what I
present as a problem. You cannot rely on Flash being installed
(although it almost always is) nor can you rely on it being activated,
nor can you assume people can hit anything other than port 80 due to
firewalls, etc. I also worry about Adobe being the new custodians of
Flash. I’ve never thought very highly of Adobe. Here is a company that
is taking well over a year to bring out universal binaries to the Mac
for flagship products. They had a year of warning prior to begin the
road to universal binaries and now they need another year to get
something out??? Two years? How bad was their codebase? did they
follow any Apple Cocoa, etc. standards? Something is really wrong
there. That is not a good sign for Flash.

Not to throw a wet towel onto the fire, this is a very cool project and
I’ve already played around with it. I just wouldn’t want to bet the
farm on such things in the future. Its niche at best, and thats not
really a bad thing depending on your use and end target.

However, what I predicted would hinder Flash was the way it was being
used for these online ads that flash, flicker, move, beep, etc. You see
them EVERYWHERE and they are annoying. So much so that a lot of people
use things like Flash Blocker or other tools. If it wasn’t for
Homestarrunner.com I wouldn’t even have Flash installed.

yeah, im not too annoyed that i cant even install flash (amd64 version
still vapourware)

i think the firefox people are on the ball, and long-lived sockets would
be a nice addition to the platform…

Not to throw a wet towel onto the fire, this is a very cool project and
I’ve already played around with it. I just wouldn’t want to bet the
farm on such things in the future. Its niche at best, and thats not
really a bad thing depending on your use and end target.

flash now doesnt mean no native in the future, either via a “comet.js”
or built-in functionality. its neat to see this infrastructure in place
for rails, i thought i was going to need to switch to twisted :slight_smile:

a blog post explaining how this compares to EventMachine, or how to
integrate eventmachine into rails, using backgrounDRb would be cool.
essentially i want to control a single icecast source via the web,
‘interrupting’ the current read location based on requests, and a bit
bewildered how to send messages to loops running in other threads etc :slight_smile:

No - Juggernaut doesn’t apart from a push server (included) - which
manages subscribed users. You can’t make everything part of rails as
rails uses Fast CGI so can’t handle the long lived connections that
Juggernaut implements. The push server is made in ruby.

Any plans to implement the push server in native C ? That should give
tremendous performance increase.


rm -rf / 2>/dev/null - http://null.in

“Things do not happen. Things are made to happen.” - JFK

On 7/20/06, Pratik [email protected] wrote:

Any plans to implement the push server in native C ? That should give
tremendous performance increase.

As well as tremendously reduce portability? See thread on binary
extensions and Win32.

I expect the push server will be mainly I/O constrained not CPU
constrained. And the underlying socket code for Ruby is in C, any way,
isn’t it?

– G.

Mongrel for example over webrick ?

On 7/21/06, Guido S. [email protected] wrote:

isn’t it?

– G.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


rm -rf / 2>/dev/null - http://null.in

“Things do not happen. Things are made to happen.” - JFK

Webrick is an HTTP server. 3000 lines of Ruby. Sockets mainly used
only in httprequest.rb and httpresponse.rb. Most of the Webrick code
is not doing anything with the sockets.

– G.

Pratik Naik wrote:

No - Juggernaut doesn’t apart from a push server (included) - which
manages subscribed users. You can’t make everything part of rails as
rails uses Fast CGI so can’t handle the long lived connections that
Juggernaut implements. The push server is made in ruby.

Any plans to implement the push server in native C ? That should give
tremendous performance increase.


rm -rf / 2>/dev/null - http://null.in

“Things do not happen. Things are made to happen.” - JFK

I’m looking at C and also the twisted framework. If anyone could lend a
hand in porting over the push server I’d be very grateful.

Just found this at http://juggernaut.rubyforge.org/faq.html :

*Doesn’t a Ruby webserver take up a lot of resources and is quite slow?
*With many threads you might see performance issues. My advice is to
re-write the push server in C - please let me know if you’ve done this.

On 7/21/06, Guido S. [email protected] wrote:

constrained. And the underlying socket code for Ruby is in C, any way,


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


rm -rf / 2>/dev/null - http://null.in

“Things do not happen. Things are made to happen.” - JFK

Pratik Naik wrote:

Just found this at http://juggernaut.rubyforge.org/faq.html :

*Doesn’t a Ruby webserver take up a lot of resources and is quite slow?
*With many threads you might see performance issues. My advice is to
re-write the push server in C - please let me know if you’ve done this.

I’m just reiterating what DHH said here:
http://www.ruby-forum.com/topic/62907

Currently just using threads. But this is stupid simple stuff. The
socket server is tiny. It’s an obvious fit to rewrite it in C to get
blazing speed. All the socket server does is match IDs to sockets and
pass messages through.

On 7/20/06, Alex MacCaw [email protected] wrote:

Currently just using threads. But this is stupid simple stuff. The
socket server is tiny. It’s an obvious fit to rewrite it in C to get
blazing speed. All the socket server does is match IDs to sockets and
pass messages through.

Well, it’s hard to argue with DHH, isn’t it? :slight_smile:

Also, have done a little research on my own and I now see that the
server is an external process, so Pratik is probably right then.

– G.

On 7/21/06, Pratik [email protected] wrote:

… My advice is to
re-write the push server in C - please let me know if you’ve done this.

Not C, but Perl. Still can be useful:

[ http://cometd.com/ ] - Cometd is a scalable HTTP-based event routing
bus that uses a push technology pattern known as Comet.

I’ve just released a new version that fixes some of the caveats of the
previous one.

Release Notes:

* Allows communication over port 443, wonâ??t get blocked by 

firewalls.
* Fixes some errors in the push server.
* Moved Flash Player up to Player 7 (still supported by linux).

Grab it from rubyforge: http://rubyforge.org/frs/?group_id=1884

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs