Speaking as a new jruby experimenter - it would be nice to have a page
that talks about how the java/jruby world maps to the traditional
Rails/LAMP style way of doing things. For me, the Wiki doesn't yet
have something for non-java users that put everything in one place.
After a short time of poking around, here's the summary I came up
with. Does it make sense to put something like this on the wiki?
-------------
Glassfish takes the place of mongrel/webrick.
There are two flavors of glassfish setups.
One is the glassfish gem; it's like running 'ruby script/server' in
your app directory. If you're not a Java shop, it's what you're going
to run.
Java shops tend to have existing Java glassfish server running
somewhere though - to use that, you build "war" files (they're
tarballs with some extra cruft in there that Java webservers
understand) and send them to some glassfish server through an admin
interface. You'll probably want to set up one of these on machines
that serve multiple applications (beats me how, but there's probably
lots of good glassfish documentation floating around somewhere.).
Glassfish (both flavors) is a single process with many threads.
However, the JVM can create multiple Java processes inside a single OS
process, so you don't have to worry about the
wait-but-rails-isn't-multithreaded issue. The Java world probably
calls these things something other than a "process," but from the Ruby
point of view they might as well be in different OS processes.
You have to tell glassfish how many Ruby processes you want.
Apparently, the normal glassfish behavior when it runs out of these
processes is to either serve up blank pages or errors. Probably gets
set to something like 2x the number of CPUs you've got.
You'll still want to put glassfish behind Apache with mod_proxy, but
glassfish doesn't need multiple ports - effectively, all the processes
respond to the same port.
You'll see mail and posts about these things:
Warbler: a tool for creating war files.
Goldspike rake plugin: it's obsolete, replaced by warbler. Also known
as plain "Goldspike."
Grizzly: a part of glassfish - you don't use it directly.
--
James Moore | [EMAIL PROTECTED]
Ruby and Ruby on Rails consulting
blog.restphone.com
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email