2008: The year of JRuby?

2008 will probably be the year of JRuby. JRuby solves the two biggest pain points I hear from developers about Ruby.

  1. People think Ruby is slow, so I can’t try it out.
  2. I don’t know how we would deploy it, what is all this Apache/Mongrel/Rewrite stuff? Can’t I just deploy on our app server?

Headius by Charles Oliver Nutter has a quote from Rich Manalang from Oracle AppsLab with this to say about launching a JRuby based application:

This was an amazing project to be a part of. And one thing I’ll say is that for anyone working in a Java EE environment where you have to use the stack that’s there, the future is bright and it’s all because of jRuby, Rails, and the speed and agility at which you can build applications on that framework. I’m convinced that jRuby is [the] best way to deploy a Rails app if you need performance and flexibility. My prediction: next year will be the year for jRuby’s rise into the mainstream.

What Charles doesn’t mention is that they did most of their development using “plain old ruby” via the C-based runtime (MRI) and then used JRuby for deployment, focusing on JRuby aspects and performance required to launch. Their performance numbers were interesting also. They initially started at a pitiful 40 req/s (requests per second), quickly realized they forgot to change to the standard production configurations doubling their performance to 80 req/s and then after some tuning saw 200 req/s. Finally, they let their app server warm up and saw 400-600 req/s… here are some important details:

After the app server warmed up, things got real interesting… the numbers went way up (400-600 reqs/sec). *Disclaimer: I’m not a performance guru. I did most of my tests using Apache Bench running against the logged in home page of Mix, which btw, doesn’t use any fragment caching at all (actually, Mix is not making use of any caching right now — we’ll get to it eventually, but it doesn’t seem like we need it yet).

Given that I can’t mention ruby without someone proclaiming that it’s “slow”, I’m excited for the future.

Leave a Reply