What's New: Releases and Oh Right, a New Gig

Posted by Nick Sieger Thu, 27 Aug 2009 20:12:00 GMT

So, after a long, busy summer, I’m finally back onto support of the various bits for JRuby web application development (meaning Warbler and JRuby-Rack). I’m pleased to announce the 0.9.5 release of JRuby-Rack and the 0.9.14 release of Warbler! All of this brought to you courtesy of Engine Yard, my new employer!

Both of these are long-overdue releases. Here’s the low-down on each:

JRuby-Rack 0.9.5

For the full history, see the 0.9.5 entry in the History.txt file.

One bad bug in particular prevented you from running Rack-powered Rails 2.3 out of the box at all because JRuby-Rack bundled an older version of Rack than needed by Rails. This has been fixed for good by not forcing JRuby-Rack’s bundled copy of Rack on your application; any version of Rack you include (either via gems or vendor’ed in Rails or your application) will take precedence.

Another major upgrade is the introduction of rewindable requests. The Rack spec dictates that the request IO object be rewindable and that server/handler writers (such as myself) need to buffer the input. You’d think that Java application servers would do this for you, but, as is the case with Java so often, servers perform the bare minimum amount of work and leave the grunt work to the application developer. So JRuby-Rack takes care of the input buffering for you. The first 64k of input data are buffered entirely in memory; above that the request body is dumped into a temp file. (64k is a default and is configurable. If you have a better suggestion for a default, let me know.)

Finally, this release brings back Java Servlet-based sessions for use with the Rack-based session mechanism. For those of you experimenting with hybrid Rails/Java applications and want to share session data between them, you’ll want this. Servlet sessions are not the default; you need to turn them on by setting ActionController::Base.session_store = :java_servlet_store.

Warbler 0.9.14

Warbler’s main change this release is to unbundle JRuby. When you install Warbler as a gem, you’ll now get a dependent gem called jruby-jars installed for you. We’ll be releasing a new version of this gem with every release of JRuby, and you’ll be able to upgrade JRuby versions without having to update Warbler.

JRuby-Rack is still bundled with Warbler for now (0.9.14 comes with JRuby-Rack 0.9.5 of course), but the jar file is not that big and the two projects tend to be released around the same time. By Warbler 1.0 I hope to have a mechanism to unbundle all jar files so that Warbler is just a lightweight Rake library with enough smarts to fetch the binaries your application needs.

Future

The projects seem to be headed for a 1.0 release soon. For these releases, I hope to ensure that they are both ready to take advantage of Rails 3 out of the box. One of the ways is to use Bundler in Warbler to manage gems. Hopefully as Rails 3 and other applications start to standardize Bundler manifests, it means less custom configuration for Warbler.

Since the core of JRuby-Rack seems to be stabilizing, the next promising step is to explore more ways to integrate with existing Java code and Java applications. This should dovetail nicely with JRuby’s plan for better Java integration in the upcoming JRuby 1.4 release. For example, Christian Seiler explained how he’s using JRuby-Rack to integrate JMS while running an in-memory ActiveMQ server for his site blissmessage.com. These kinds of ease-of-use scenarios where you can start a single process with all of your application needs: web server, message queue, timer for periodic tasks etc. present a great way to jumpstart a project. I’d like to see some of these APIs standardize so that we can transition from all-in-one development servers up to scalable production clusters where app, message queue, and other servers are separated and standalone.

The fellows over at Google have been busy this summer with the appengine-jruby project, and there are opportunities for tuning that experience as well.

Of course, your suggestions are welcome too. I’d appreciate it if you’d drop me a line if you’re doing something novel with these tools, so I can help shape future directions around people like you who are Getting Things Done with them!

(Postlude: Both these projects need a logo. If you can mock something up, I’d love to see some ideas!)

Tags , , ,  | 1 comment

Comments

  1. Avatar Aaron Reichman said 12 days later:

    Hi Nick-

    First of all, congrats on the new job!

    Two questions about the new version of Warbler:

    1. Will it work without the ‘jruby-jars’ gem even installed? For instance, can I just install warbler and then modify the warbler config file to load JRuby from my lib folder, etc.?

    2. For future releases, will the updated ‘jruby-jars’ gem be posted along side the bin and “complete” jar files at jruby.org/download? Some of our apps are deployed on intranet web servers that are not connected to the internet, so ‘gem install ...’ doesn’t work. We need to manually copy over and install any gems we need. So being able to copy all of the JRuby libs we need from one place would be great. For now, we have to copy JRuby 1.3 from jruby.org and then get the jruby-jars gem from RubyForge.

    Thanks, and keep up the great work!

    -Aaron