DbEnv under mod_perl 2.0/Apache 2.2 worker MPM (multi-threaded)
I'd like to draw your attention to a thread I've opened on the mod_perl mailing list. I'm having difficulties figuring out how to initialize the Berkeley database environment on this particular platform. It may be that mod_perl is not the most suitable choice of platform for developing an application working on Berkeley DB, but still I'm curious to know whether or not this is at all possible, and if not, what are the reasons for this mismatch.
Note that I'm actually using the Perl interface to Berkeley DB XML instead of plain Berkeley DB. However, George Feinberg, the DB XML lead developer (I believe), pointed out that the issues I'm seeing pertain to the setup of the database environment, and that once this has been safely accomplished, the DB XML calls are safe, too. That's why he advised me to bring this issue to the attention of the Berkeley DB forum, which I'm now doing. Here we go:
Initializing Sleepycat::DbXml (Berkeley, Oracle) objects in startup.pl | ModPerl
http://www.gossamer-threads.com/lists/modperl/modperl/98849
It may be that a precise answer would require a lot of knowledge of the very particular mod_perl 2.0 multi-threaded platform and its intricacies, which I don't have myself and I know is not commonly found, as Perl has ceded a lot of ground to PHP and Java. But maybe there is someone here who can help.
The fundamental issue here is the setup of the environment. There has to be (1) a thread of control doing recovery on startup, and then (2) any number of threads of control which may or may not share environment handles. How could this be accomplished in this particular environment?
If you're interested in this issue, please follow the link to the mod_perl mailing list and see what's there. Note you can switch between flat and threaded view.
Thanks.
Michael Ludwig