On Wed, 2 Jun 2004 17:38:53 +0900, Dick Davies wrote

> I've shyed away from mod_ruby since being quite happy with its
> power and usability because of this - could someone explain the 
> actual problems with it, and is there a fix? Do other systems like mod_perl
> not have the same issues?

Jim and Bob are both using mod_ruby on the same host.  Jim has software that 
modifies Hash.  Bob also has software that modifies Hash.  Either Jim or Bob 
is going to be upset because one of their programs is going to modify Hash 
after the other, wiping out the other's changes and causing software to fail.

The interpreter is shared.  It is a model that makes technical sense, but it 
leaves open the possibility that one program will walk on something that 
another program needs.  Most of the time this doesn't happen, but when it 
does, it is a pain in the butt problem.

And yes, mod_perl has the same issue.  Long ago in a galaxy far, far away I 
actually had it bite me when a server that I was running had two seperate 
programs trying to do things in the same namespace.  They just kept walking 
on eachother and nothing worked.  Once we discovered the problem, it was 
easy to fix it and move on, but in a hosting environment you can't count on 
two random individuals to be quite so agreeable.  :)

In an environment where you are either in control of what is running on the 
server, or you are at least dealing with coworkers who also understand the 
need to play nicely with globals, namespaces, and modifications to core 
pieces of Ruby like Hash, there is no reason not to use mod_ruby.  And if 
you want to do something special with your request handling and need to 
write a handler to make that happen, mod_ruby is a delightfully easy way to 
do that.


Kirk Haines