InfoQ

News

Great Expectations for JRuby 1.0

Posted by Alexis Midon on Apr 04, 2007

Community
Java,
Ruby
Topics
JRuby
Tags
ThoughtWorks ,
JRuby ,
ActiveRecord

Since the release of JRuby 0.9.8 about a month ago, information about JRuby progress has been a little hard to find. But the latest news out of the JRuby camp leaves us no doubt that it is because the team is working harder than ever in order to deliver JRuby 1.0 before JavaOne.

In his latest post, Charles Nutter gives us some very exciting tastes of improvements the first production release will bring. The performance boost is significant:

...the current trunk code is almost another 2X the performance of 0.9.8 (...). The compiler also supports almost 2X the number of syntactic constructs it did in 0.9.8, and it's getting faster and more stable every day. There are actually a number of benchmarks running faster than MRI (the C version of Ruby) even when interpreted.

Another great piece of news is that Rails' ActiveRecord is now fully supported on JRuby. The last remaining failing tests have been fixed and all units tests are green. Now a Rails application using MySQL can run safely on JRuby.

InfoQ caught up with JRuby team member Ola Bini for more details on the latest ActiveRecord milestones:

Since when the JRuby team is working on the ActiveRecord support?

Actually, we aren't, as such. We haven't done anything on ActiveRecord itself, except possibly finding bugs in the tests. What we have been doing, since June last year, is working on the project ActiveRecord-JDBC (AR-JDBC from here on).

This project is an ActiveRecord adapter, only usable within JRuby, that allows ActiveRecord to work with JDBC (the standard Java database connection framework). It's absolutely necessary to have this, since JRuby can't use the database drivers that regular Rails uses. So we have had AR-JDBC working fairly well for quite some time. When we released 0.9.8, we decided to claim that we supported Rails, but we still had some failures in the Rails unit tests; and most of these were actually from ActiveRecord (about 50-60 errors and failures, out of about 1100 tests). So last week I decided to get these problems fixed for MySQL, first and foremost. This decision have resulted in several fixes to AR-JDBC and JRuby, and as the original announcement mentioned, we are happy to say that MySQL is fully supported now.

What were the toughest features to implement?

There are two things I would qualify as the toughest: first, the ActiveRecord tests. The tests are very good in many places, but there are also tests that depend on hash ordering and other more strange things. This makes it hard to see if it's actually a real failure, or just a strangely implemented test. Second, ActiveRecord does lots of processing on the data from the database, quoting and other things. These are hard to get right, especially for date and time information. But the tests are very helpful in fixing these issues.

Charles Nutter points out "a few caveats" remaining, could you give us more details about that?

Those caveats are first and foremost that there are a few tests that need to be modified to actually run correctly, as I mentioned above. Aside from that, all is dandy.

What are your next developments on JRuby?

Right now we're working hard on performance and correctness. We want to release 1.0 sometime in May, and at that point we're aiming for blazing speed and blinding correctness. =) Well, what we are doing is fixing all bugs we can find, trying to decide how the Java Integration features should finally look like, and also working the a Java bytecode compiler. So, in May, JRuby should be a force to reckon with.

A side question: you recently accepted an offer from ThoughtWorks. Could you give us some hints about your projects concerning JRuby with ThoughtWorks?

Well, not really. I won't actually start until June 4th. Until then I'm helping out informally with some projects, but most of it is still under cover. What I can say, is that when I start at ThoughtWorks I will be able to spend time on doing great things for both JRuby and Ruby.

No comments

Watch Thread Reply

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.