On Sun, 2004-03-07 at 13:34, Perrin Harkins wrote:
> Jeffrey W. Baker wrote:
> > I wasn't aware of these issues before.  Looks like I'll have to use
> > BerkeleyDB or Tie::DB_Lock or something.
> 
> On closer inspection I think it's mostly okay because the session object 
> is supposed to go out of scope and get destroyed (and thus untie) after 
> every interaction, and the locking should mean that only process is 
> writing during that time.  You could run into trouble though if a 
> process is able to open for reading and then later do writes without 
> closing and re-opening the file first, and it looks like that does 
> happen.  This could lead to lost updates from other processes.
> 
> I'd suggest either looking at how MLDBM::Sync works, or using BerkeleyDB 
> instead.  BerkeleyDB can be tricky to get right, but it's significantly 
> faster than any other storage mechanism supported by Apache::Session.

It's faster in the trivial case, but doesn't exactly scale horizontally,
that is to more than one server.  I've also seen BerkeleyDB doing seek,
read, write, sync in such a pattern that the Linux kernel will starve
all other I/O on the machine.  But this is a platform-specific trouble
:)

In any case, it will be a simple addition.


-jwb

-- 
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