On Sun, 2004-07-04 at 19:38, Jean-Michel Hiver wrote:
> > The idea is to get always the same apache process to handle requests 
> > from the same client.
> > 
> > I need this because I want to use something that is in memory, in a 
> > mod_perl variable.
> 
> You need a session to uniquely identify clients. There are a horde of 
> module on CPAN to help you do that.
> 
> http://search.cpan.org/search?query=apache+session
> 
> 
> Also if you want to keep stuff in memory that is shared between 
> processes, memcached should do the trick quite neatly.
> 
> http://search.cpan.org/~bradfitz/Cache-Memcached/Memcached.pm

Agreed, there is no way to control which process a particular client
will connect to.  Memcached may or may not be helpful though.  Memcached
works by serializing data with storable, sending it off to a separate
daemon process, and then fetching it back from the daemon later and
de-serializing it.  It won't work at all for things like database
handles or most objects involving XS code or anything else that Storable
can't handle.  It's also not as fast as actually using something in
memory in the current process.  Whether or not it works for this problem
depends on what is in that variable.

- Perrin


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to