On 4/5/07, Nils Kaiser <[EMAIL PROTECTED]> wrote:
1) BerkeleyDB: Is berkeleyDB the best solution here? we decided to go for berkeley because of performance aspects and the maturity of the project (tools for database recovery). We want to deliver a generated cache to our customers, so beeing able to import/export the database safely during operation would be a nice +.
It's a bit more work to build a cache with BerkeleyDB than to use Cache::FastMmap, but I'm not sure if you can move the files from the latter easily.
2) Data corruption: Some people are talking about data corruption issues that can lead to a lock on database opening. How can this be prevented? Can data corruption happen during normal operation or just on apache crashes? in the second case would it be sufficient to run the database repair script before apache server restart??
My experience with this is a little old, but when we used BerkeleyDB for caching at eToys we would sometimes get corruption if apache crashed or was killed (abnormal shutdown). This may have been fixed. I think you'd have to test it yourself with a current version. What we did was just to delete the cache on startup if it was corrupted.
3) Other crash scenarios: As our script has to catch every request to the root page, stability has #1 priority. Besides database corruption, what kind of crashes can occur in a mod_perl / berkeleyDB environment?
If you use the fancy locking, deadlocks are possible. The included deadlock daemon should solve this, but the way to use it is not entirely obvious. The database-wide locks are still very fast and may be safer. They shouldn't have deadlock issues.
4) Deployement: We don't want to force our customers to build their webserver or to build anything at all. Our customers will always have some kind of enterprise linux (redhat, suse, ...). Are RPMs provided for these system (for everything including mod_perl, perl-berkeleydb)?
I'm not sure what the quality of the RPMs would be, especially considering how bad the mod_perl RPMs for RHEL are. (They're ancient.) You may want to build your own RPMs for the perl stuff. BerkeleyDB RPMs are available and they seem to be fine. If your use is really just a cache, you may save yourself time by using Cache::FastMmap instead. It's worth a look anyway. - Perrin