RadRails on linux with JRockit

Saturday, February 25

Lately, I’ve been using RadRails for Rails development on my laptop (ubuntu linux), and for some reason I find it painfully slow. I decided to google “RadRails performance” and stumbled upon JRockit, an optimized JVM for multiple platforms.

I downloaded JRockit from the BEA site and followed the installation instructions for linux to get it running. So, here’s the quick summary of how I put RadRails on JRockit.

Download the JRockit installer, put it somewhere, and make it executable:

$ chmod +x jrockit-R26.0.0-jdk1.5.0_04-linux-ia32.bin

Now you can run the installer in console mode and it will walk you through the rest of the process. I used the defaults for everthing and just Next’d my way through.

$ ./jrockit-R26.0.0-jdk1.5.0_04-linux-ia32.bin -mode=console

With JRockit installed, getting RadRails to use it is a simple matter of appending the -vm argument when launching it. You can do this directly from the command line, or if you’ve created an icon launcher, you can edit its command:

$ ./radrails -vm ~/jrockit-R26.0.0-jdk1.5.0_04/bin/java

The speed improvement is noticeable, but it’s nothing earth shattering. Still, it saves me a few seconds when I open files—before JRockit it would take ~3-5 seconds to open a file. Now it’s down to about one second which is at least bearable. I’m really starting the feel the hurt of not having TextMate on linux. I think it’s time to bite the bullet and pick up one of those new MacBooks. Now, if I could only convince my wife…

UPDATE: after several crashes and a decision to revert to the default (Sun) JVM, I found Christian Pelczarski’s article on the subject in which he claims “[the] new Sun JVM seems a bit faster than JRockit.” (Granted, his article pertains to Windows, but I figured I’d try it anyways.) I’ve been running RadRails with it for about an hour now; performance is about the same as with JRockit 5, but it’s certainly more stable.

The business case for Ruby on Rails

Wednesday, December 21

From the Rails weblog and in the latest volley in the continuing saga of Rails vs. Everyone Else, DHH proclaims, “the other consultancy bid a million dollars for a Java-based system, but the CIO picked the Rails solution.”

In perfect movie-poster form, find out why Curt Hibbs is calling Obie Fernadez’s post on Productivity Arbitrage a “Must-Read!”

Instead of Java, they differentiate themselves by pitching a Ruby on Rails solution. Quite innocently, they undercut their competition by pricing their bid at $800K and promising delivery within 6 months. According to their calculations, (and once again, these are rough figures), 4 resources x $192 rate x 8 months equals about $800k.

Obie also cites another pair of articles with a particular Relevance: Ruby/Rails—Put your money where your mouth is and its successor, Bidding Projects with Ruby/Rails, Take 2. Coming from the blog of some Java heavyweights, this is great stuff. A couple of choice cuts,

For the past 18 months, we have been quietly bidding web projects with both Java and Ruby on Rails. The numbers for us, so far, fall out like this: for applications in the Rails sweet spot (CRUD+Ajax on the web) our Rails price tends to be 30-50% less than the same bid implemented in Java.

And on the topic of maintainability,

One thing I point out to customers is that maintenance cost is some function of the size and quality of the codebase. A well-written Ruby codebase can be an order of magnitude smaller than a similar codebase in Java.

And as if all this press weren’t enough, Rails has experienced yet another Slashdotting. My favorite reply to “Is Ruby on Rails Maintainable?” is from the seminal Bruce Perens,

Maintainability is a combination of several factors. Most important is: can you read and understand the code? Ruby on Rails wins in this category because it’s brief – smaller and thus easier to comprehend than Java – without being cryptic like APL. Second most important is: is it easily modified? Here Rails wins again, because of the say it only once philosophy and because of Ruby’s duck typing.

All this on the very day that 37signals opens the doors of speculation on their newest product, Sunrise CRM.