[Jruby-extras-devel] Pleasantly surprised at rails-integration

Fausto Lelli fausto.lelli at gmail.com
Thu Dec 28 02:16:18 EST 2006


Hi,

I did tested getting a war in standalone mode (that means with all of
jruby packaged
up in the WEB-INF lib directory, but please referer to preceding discussion to
the thread RoR in War ) ad worked for me

1) install plugin:
script/plugin install
svn://rubyforge.org/var/svn/jruby-extras/trunk/rails-integration/plugins/create_war
2) rake war:standalone:create
3) I had to manually add jvyaml.jar to the generated  WEB-INF/lib
directory but I
don't know if it is a problem with my config or else it has since been fixed.

As for the implementation, I think it is as you described before,
maybe Robert can
confirm for sure.

One thing that worries me a little bit now is multiple rails runtime
instances (pooled),
which slows startup a lot. But since this is all meant for production
deployment, this could be a no-problem.

Cheers,
Fausto.


On 12/28/06, Charles Oliver Nutter <charles.nutter at sun.com> wrote:
> 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
> _______________________________________________
> Jruby-extras-devel mailing list
> Jruby-extras-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/jruby-extras-devel
>


More information about the Jruby-extras-devel mailing list