CMS News, Reviews and Resources

Content Management Matters ™

Home > Archives > Events
 Looking for a job? Check out the CMSWire Job Board.



Ruby Conference: Ruby to Crown the JVM?

By Angela Natividad
Apr 22. 2007

jruby_logo.jpg

In case you haven’t heard, JRuby is an all-Java implementation of the Ruby programming language. And here at the Ruby-fest in San Jose Nick Sieger of the JRuby core team educates us on the current apple of his eye: JRuby: Ruby on the JVM. He starts by asking, “What can Java do for Ruby?”

Java, Sun’s darling of programming languages, is hardly scoff-worthy. To start with it’s got Applets! Faces! a five-line “Hello, World!” program! and it’s enterprisey!

Woo hoo! But, can Sun — which hired the JRuby project leads last September — convince the world that Ruby atop a JVM is the right answer?

SPONSORSHIP

CMSWire speaks to a specific audience of professionals and opinion makers focused on content management, publishing and collaboration.
Advertise here.

Sieger dips into the C Ruby trunk for a few benchmarks, including:

  • Ruby still beats JRuby (interpreted) across the board, but JRuby is fast catching up.
  • Ruby destroys JRuby (compiled) fairly consistently.

So where’s JRuby today, and why should we care?

The 0.9.9 release of JRuby is slated for tomorrow. 0.9.9 improves on 0.9.8’s performance by approximately 40 percent. Slightly less ambitious than the 0.9.9 release, a 1.0 is planned for early June.

Sieger’s presentation gave way for a torrent of audience questions, most of which he handled rather gracefully.

He addressed the issue of compatibility with C Ruby, which presently lacks a compatibility suite. There are a slew of test suites up and running, including the C Ruby Sample and Language Test, Rubicon, Rubinius Specs, Rubyforge, ruby_test, Rails Tests, rSpec’s own specs, BFTs, JRuby’s own tests, etc.

Software unsupported by JRuby include Imagemagick, ParseTree, Mongrel, DBI and Ruport — components that tend to have C code in them. Ouch.

Sieger confesses JRuby is most appropriate for long-running apps.

With regards to running multiple handlers, and acknowledging that Ruby on Rails isn’t thread-safe, the integration contains a switch for creating multiple instances of JRuby inside the VM. This apparently could still use more testing, so those interested are invited to contribute.

Stability improvements in marshalling should help JRuby and C Ruby play more nicely in v 0.9.9.

Garbage collection still takes place entirely in Java. JRuby itself does no memory management, and debugger support has been an ongoing issue.

At present you still cannot get back to the Ruby source code from the Java stack trace — this is a possible improvement for future versions.

Catch more at JRuby on Codehaus and JRuby on Thresher.

Was this article useful?

Comments

I think you may have the compiled bit backwards. JRuby in compiled mode is almost always substantially faster then Ruby (the C impl).

Also, the lack of C libraries will only be a problem until people create ports of those extensions...which is generally far easier than writing them from scratch, since all those capabilities exist on the JVM already.

Posted by: Charles Oliver Nutter on April 22, 2007 10:46 PM

Add a Comment

Email:
Web Site:
Comments:
Security Code:
  Remember me?
  


stay up to date


topics
Advertise on CMSWire





Add to Technorati Favorites