perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Perrin Harkins <phark...@gmail.com>
Subject Re: non-stop generational modperl config update strategies?
Date Wed, 21 Apr 2010 14:59:01 GMT
2010/4/21 Torsten Förtsch <torsten.foertsch@gmx.net>:
> The mmapdb databases (single files) can be prepared off-line and then be
> copied to the destination. Then the old database (still mapped by its users)
> is invalidated by setting a flag. At the time of the next access the new
> version will be mmapped. MMapDB is completely lock-free. So, deadlocks as with
> BerkeleyDB cannot occur.

Actually, this is the same approach I would use with BerkekelyDB:
build the database offline, watch for a newer file in a directory,
switch to the new one when it arrives.  This is a read-only
application, so there's no need for locks at all.

In both cases you have the same drawback: it's impossible to read
anything from the shared data without copying the data you read into
perl variables.  A shared database only saves memory if you don't need
all of the data to handle a request.

- Perrin

Mime
View raw message