[Jruby-extras-devel] Pleasantly surprised at rails-integration
Charles Oliver Nutter
charles.nutter at sun.com
Wed Dec 27 23:44:53 EST 2006
This evening I started thinking about the Grizzly support for running
Rails, and it occurred to me that there must be a better way than
calling Rails own dispatcher directly. Specifically, it seemed wasted
overhead to use Ruby's CGI library to process requests and responses
when the container would do that for you.
As I started to look into what would be required to implement a more
direct request and response model, I thought I'd see if the
rails-integration code does that. Naturally, it has beaten me to the punch.
I'm no rails expert, so tell me how close I am on this...
rails-integration provides servlet-based implementations of
ActionController::AbstractRequest based on HttpServletRequest and
HttpServletResponse. It maps all calls through as appropriate and avoids
re-parsing or re-handling request and response headers. By doing this it
also skips a large portion of the request processing that normally slows
down Rails.
Am I on the right track here?
This is really great stuff guys, and has potential to beat even servers
like Mongrel in performance (since we're relying on tried-and-true Java
servers to handle all the HTTP nonsense, rather than Ruby's CGI library).
So what's the status today? I have not been able to get a WAR'ed up
Rails app working...is there a walkthrough somewhere on how to do it?
(it should be in the JRuby wiki somewhere, methinks).
Get me going on this stuff and I'll buy y'all a beer some day. Oh, and
I'll start using it and making contribution to the code.
--
Charles Oliver Nutter, JRuby Core Developer
Blogging on Ruby and Java @ headius.blogspot.com
Help spec out Ruby today! @ www.headius.com/rubyspec
headius at headius.com -- charles.nutter at sun.com
More information about the Jruby-extras-devel
mailing list