RailsConf slides

Posted by Nick Sieger Sat, 31 May 2008 23:42:00 GMT

If you already saw my JavaOne slides, these aren’t too different, but I think they’re better and prettier, too.

JRuby at RailsConf

Get them here.

Update. The slides are pretty lean on explanation. Just in case you’re confused, the narrative goes like this:

  • What’s your deployment nirvana look like? (various existing options)
  • With JRuby, you can deploy Rails applications in a single operating system process instead of many.
  • However, there are a few configuration changes needed to accomodate JRuby. (Steps for converting existing apps, configuration code snippets.)
  • Now, JRuby-Rack helps with the configuration, because all of the logging/session/public path re-jiggering is taken care of for you. It’s now bundled with Warbler as of version 0.9.9.
  • Performance is good and getting better. You can scale up the number of requests you can handle really easily just by setting the number of runtimes to create inside Warbler’s config/warble.rb file.
  • Lots of new stuff is happening right now to make Rails better. JRuby will be able to leverage these changes and become an even more desirable deployment platform. Stay tuned!

Tags , ,  | 3 comments

JRuby Hackfest at RailsConf

Posted by Nick Sieger Thu, 22 May 2008 15:40:00 GMT

Thanks to our friends at LinkedIn, Joyent and Sun, we’re having a hackfest at McMenamins/Kennedy School on Thursday evening, May 29, starting at 6:30pm, complete with food and beverages!

Do stop by and hang out with us! Leave a comment over at Charlie’s announcement if you’re interested in joining us.

McMenamins

Kennedy School
Local: (503) 249-3983
Elsewhere: (888) 249-3983


View Larger Map

Tags , ,  | no comments

JavaOne slides

Posted by Nick Sieger Thu, 08 May 2008 22:02:39 GMT

For those of you interested in the content of my talk at JavaOne this morning, here are the slides.

(They’re not quite the version I used in the talk -- just the readable, context-free, usable bits.)

no comments

Introducing JRuby-Rack

Posted by Nick Sieger Thu, 08 May 2008 17:31:00 GMT

Continuing in the spirit of Conference-Driven Development, I’m happy to announce the first public release of JRuby-Rack! You can use it to run Rails, Merb, or any Rack-compatible application inside a Java application server.

Also released today is Warbler 0.9.9, which has been updated to bundle JRuby-Rack.

In addition to providing as seamless a connection as possible between the servlet environment and Rack, JRuby-Rack (along with Warbler) is also bridging the gap between Ruby and Java web development. Some of the things it does are:

  • Makes the Java servlet context and servlet request available to Ruby through special variables in the Rack environment
  • Servlet request attributes from Java are passed through and available in the Rack environment. Request attributes can override Rack variables such as PATH_INFO, QUERY_STRING etc.
  • Configures Rails deployment options such as page caching directories and session handling automatically and optimally for the servlet environment.

I’ve also included the beginnings of some extensions that should help integrate Rails with existing Java web frameworks, servlets, JSPs, and other code. For example, you can invoke a Rails request from within a JSP with a tag:

<jruby-rack:rails path="/projects/activity" params="layout=none"/>

You can set servlet and session attributes and forward to other servlets and JSPs from your Rails controllers:

class DemoController < ApplicationController
  def index
    servlet_request["hello"] = "world!"
    session["rails"] = "Visible to java!"
    forward_to "/attributes.jsp"
  end
end

and read them from within the servlet or JSP:

<dl>
  <dt><tt>servlet_request["hello"] | request.getAttribute("hello")</tt></dt>
  <dd><%= request.getAttribute("hello") %></dd>
  <dt><tt>session["rails"] | session.getAttribute("rails")</tt></dt>
  <dd><%= session.getAttribute("rails") %></dd>
</dl>

This is just the beginning of this kind of integration, and I’m interested where people take it. I think this provides a nifty way to start integrating Rails bits into existing applications or reuse existing Java web application code.

I’ve tagged the release with an 0.9 version number. I believe the bits are ready for serious use, but could use some help pounding out a few more bugs before calling it 1.0. So jruby -S gem install warbler today, try it out, and bring plenty of feedback to the JRuby user list!

Tags , , ,  | 17 comments