Hello,
we are using a webservice to check if a user agent is a mobile or full
browser. We have to integrate this on the root path of a site to
redirect mobile browsers to a mobile page.
After investigating, we decided to go for a mod_perl / berkeleydb
solution. The berkeleydb caches the data for each user agent, so the
webservice will be only queried once. Coding is not a problem as we have
one perl developer to do that.
Some comments on the following issues would be nice:
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 +.
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??
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?
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 thinking about writing an article on this as it might be useful for
others, so the information won't get lost.
Thanks for any comment!
Nils