From: "Ara.T.Howard" Date: 2004-08-10T01:41:19+09:00 Subject: Re: ANN: Iowa 0.9 Released On Mon, 9 Aug 2004, Kirk Haines wrote: > Iowa could definitely be setup to run directly as an FCGI process, too. I > should do that, as an option. Should be pretty trivial to setup. > >> does the mod_ruby or cgi bit manage initially starting the iowa app, >> or is this a separate step? > > The Iowa app runs as a seperate bit. This allows some flexibility to, for > example, run the Iowa process on a seperate machine from the web server. > Down the road I am planning on making it possible to have multiple Iowa > processes running across multiple machines for load balancing with session > affinity, so that fits the model of the Iowa process _generally_ being > seperate, too. and, of course, the mod_fastcgi module doesa all of this (including session affinity). >> so one must avoid doing anything that could potentially block an entire >> ruby process, like flock, or no new requests would get served - correct? > > Hrm. Yeah. Interesting point. I've never had to deal with that problem > myself, but I can see where it could be troublesome. One thing I have toyed > with for about as long as I have been using Iowa is the idea of having as an > option a forking model instead of a threading model to handle connections. > With Ruby's all-within-a-process, there would be some potential performance > advantages to a forking model, especially if it were a forking model with > preforking. I just never have done it because I never have needed it. i'm looking into writing a monitoring app that uses an sqlite backend - it uses fcntl based locks - so this is a big issue (note to any/all of you using sqlite as a db for web apps) > Yep. The model that I used for webrick was to combine the Iowa and WEBrick > processes. So you fire up one process, and it serves regular image/static > HTML/cgi content through WEBrick's regular capabilities, and Iowa content > goes through the Iowa side of the process. It is extremely simple to start > it up. Take a look at the examples/webrick part of the release. You should > be able to just run examples/webrick/iowa_webrick.rb and everything should > just work. > > Performance also seems pretty decent. I have not tested it extensively, but > a few quick tests suggest that for Iowa content it's about 70% of the speed > of apache + mod_ruby, and I assume most of that is simply the difference in > speed between WEBrick and Apache. I'll be doing some more extensive tests > later with larger & more complex content generation, but that sort of speed > is pretty reasonable. On a PIII 800Mhz running Gentoo Linux, that > translates to something in the low 20s of requests per second for a typical > moderately sized & moderately complex page. very slick - i like this approach the best. > Well, give me a shout if you have any more questions. I'm always happy to > give a hand where I can. will do - thanks for the info -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | A flower falls, even though we love it; | and a weed grows, even though we do not love it. | --Dogen ===============================================================================