CMS News, Reviews and Resources
Content Management Matters ™
 
 

Ruby Conference: Ruby to Crown the JVM?

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?

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

SPONSORSHIP
CMSWire speaks to a specific audience of professionals. You can too. Advertise here.

  • 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.


Did you find this useful?

1 Reader Comment

1 | Charles Oliver Nutter — April 22, 2007 10:46 PM

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.

Leave a Response

  Remember me?

Related Events Articles

 
 

From our Job Board  View all jobs | feed Jobs RSS feed | Post a job right now

 

Featured Events  View all events | feed Events RSS feed | Add your event

Add to Technorati Favorites
STAY UP TO DATE
Subscribe to our RSS feed...
SUBSCRIBE TO OUR RSS FEED