InfoQ

News

Great Expectations for JRuby 1.0

Posted by Alexis Midon on Apr 04, 2007 08:30 AM

Community
Java,
Ruby
Topics
JRuby
Tags
JRuby,
ThoughtWorks,
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

Reply

Exclusive Content

Rationalizing the Presentation Tier

Thin client paradigm characterized by web applications is a kludge that needs to be repudiated. Old compromises are no longer needed and it's time to move the presentation tier to where it belongs.

Agile Project Management: Lessons Learned at Google

In this presentation filmed during QCon 2007, Jeff Sutherland, the creator of Scrum, talks about his visit at Google to do an analysis of Google's first implementation of Scrum.

AtomServer – The Power of Publishing for Data Distribution

In this article, Bryon Jacob and Chris Berry introduce AtomServer, their implementation of a full-fledged Atom Store based on Apache Abdera, which is now available as open source.

An Introduction to Virtualization

It is easy to think that virtualization applies only to servers. In reality the recent resurgence of the concept is also being applied to networking, storage, and application infrastructure.

REST Anti-Patterns

In this article, Stefan Tilkov explains some of the most common anti-patterns found in applications that claim to follow a "RESTful" design and suggests ways to avoid them.

Choosing between Routing and Orchestration in an ESB

In this article, Adrien Louis and Marc Dutoo discuss the differences and relative merits of using orchestration vs. routing in a typical ESB setup, and discuss various implementation options.

Enterprise Batch Processing with Spring

Wayne Lund discusses batch processing, Spring Batch objectives and features, scenarios for usage, Spring Batch architecture, scaling, example code, failures and retrying, and the future roadmap.

User Story Estimation Techniques

Developer Jay Fields draws on his experiences as a ThoughtWorks consultant to describe effective user story estimation techniques.