We've been planning to run Rails through a kind of "CGI Servlet" that primes JRuby with appropriate environment for Rails to execute, and then just pass requests right through (through BSF, JSR223, and/or direct calls into the JRuby runtime). It should be fairly straightforward to map the incoming request params, headers, etc into appropriate places for Rails to "just work" out of the box.

For testing sake, I have also taken the direction of setting up JRuby on Rails to run as a CGI; of course this is painfully slow, but it provides a reasonable way to test stuff until we have that Servlet up and going. The recent contribution of much-improved "ENV" environment variable hash will also make this much easier.

Other than that, there's work being done to connect ActiveRecord to JDBC, transparently mingle JSPs with RHTML, potentially making both work with Rails, and getting the rest of the Rails scripts and utilities to run correctly. There's plenty to do, but for now Tom and I are both focusing on getting a simple Rails request to process (though I did recently get the "generate" script working, so we can already generate basic application primitives).

As for your second paragraph, I'm sure there are options available. When I last rewrote the threading subsystem and starting thinking about m:n threading, I realized that we'll also want to be able to provide a container-managed thread pool for JRuby to execute under and provide management capabilities for the JRuby thread scheduler itself. Those two items should provide better support for "killing off" a bad Rails request running in JRuby. The other side of the coin is that Rails is intended to run mostly stateless, and so aside from the threading issues there's nothing to stop us throwing away a JRuby runtime if it misbehaves. Is this the sort of thing you mean?

On 3/29/06, Marc Hadley <[EMAIL PROTECTED]> wrote:
I'm curious if there's been much thought+discussion about where
things go once the Rails scripts are running on JRuby ? Presumably
performance will limit the utility of a CGI-based model. Is the plan
to support a multithreaded FastCGI model, integrate with servlets
using JSR223, perhaps both of those, or something else entirely ?

AIUI, one of the things that JSPs and their ilk get dinged on is that
they all run in a single VM which makes it hard for a sys admin to
monitor individual processes/applications and individually kill-off
errant ones. Will JRuby on Rails be subject to the same kind of
criticism ?

Thoughts ?
Marc.

---
Marc Hadley <marc.hadley at sun.com>




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel



--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ jruby.sourceforge.net
Application Architect @ www.ventera.com

Reply via email to