From: Gully Foyle Date: 2004-07-22T07:47:02+09:00 Subject: Re: mod_ruby or fastcgi+ruby? Kirk Haines wrote: > On Wed, 21 Jul 2004 23:47:03 +0900, Gully Foyle wrote > >>What are the pros & cons of mod_ruby vs fastcgi+ruby? Ruby will >>most likely be the latest stable snapshot (1.8.2). > > > mod_ruby: > > + Nice access to Apache internals. > + Fast. > + You can write handlers for Apache with it. Handlers can let you do > powerful things. > + Eruby, if you like that. > + Easy config. > - Interpreter is shared among all users of mod_ruby. Potential for namespace > clashes because of this. > - mod_ruby is an Apache specfic thing. So your code isn't portable to > other web server types. > > fast_cgi: > + A familiar, conventional CGI-like interface. > + Fast. > + Pretty easy to configure this, too, though there is more complexity to > fine tuning it. > + Many web servers support FastCGI, so your code is more portable. > + Each seperate FastCGI application is in its own process so no namespace > clashes possible between different applications. > - It IS more complex than mod_ruby. > - Don't have the same level of access to the web server internals. > > It's six of one, a half dozen of the other, really. Both work well. Both > can handle busy web sites with good performance and stability. Is there a > particular templating system or web development framework that you want to > use? If so, does it support both of these, or is it better with one of > them? Which one seems more interesting to you? Can some of what you want > to do be done via a handler? Is it important to you to have your code > portable to other web server software? > > The answers to those questions may well point you toward one or the other. > > > Kirk Haines > > > Thanks for the great info! It was very helpful. I think the only remaining question I have is regarding this: > - Interpreter is shared among all users of mod_ruby. Potential for > namespace clashes because of this. I'm not quite sure I understand the nature of the namespace clash in mod_ruby. When I tried to set a global counter variable just to see what happens, it appears that each instance of apache process gets its own copy. And I was under the impression (I could be totally wrong) that only one request is served up by each process at a time. Thanks again for the info you've already provided.