Hey All,
I'll try to answer multiple people's questions/suggestions in one e-mail.
(and I notice that there are 2 more that I haven't read et from Adam and
Brad).
Use of 'Parent' implies that different virtual hosts.
Imagine thusly...
You want to run what are essentially "different websites" but Not accessible
under different sub-domains (i.e. virtual hosting) but rather under
different pathnames (URIs).
Though more aptly, each base URI directory (Alias'd to a real directory on
disk) is a sandbox for a different version of the same website. Therefore a
central CVS repository feeds separate (and inequal) branches of the CVS
repos. Each sandbox runs a different release/tag and receives updates
automatically (this is also answering some other questions from the list).
So the CVS can therefore move independently of the sandboxes and the
sandboxes move at the pace of the tags. Achieved is the ability to have a
"production" environment and a "testing" environment available under say,
URI /foo and URI /bar.
There are no virtual hosts in the schema. Though, that's not to say we
couldn't perhaps explore that. We'd like to get away from that though and
let the sandbox be a fully-owned entity of itself, blissfully unaware of
anything outside its universe (including Apache, and vice versa). Apache
shouldn't have to know about how the environment is configured, and the
environment should need to know how Apache is configured.
A solution that exists entirely in .htaccess files is actually preferred.
Therefore, one environment could be using MP2 based authentication, another
using Basic Auth, another using Digest auth, another using a different
version of MP2-based auth, ad nauseum. Make sense?
I knew that there would be performance limitations to manually performing a
do everytime. Though it perhaps may be that if I add a few if's and checks
here and there, it could be "pretty good", though not up to par with MP2's
caching. What I experience under MPM prefork is that once the child has
cached a copy of the module, it's not reloaded unless say, unload_package in
ModPerl::Util is used, or Apache2::Reload is used (with extreme prejudice).
I actually think that balancing %INC manually within the child process on an
as-needed basis based on the access of the different environments is pretty
efficient. It's somewhat of an even balance between caching, no-caching and
re-caching. (we check $INC{$modname} and if it's for a different
environment, we modify the value to be the current environment and thus MP2
should be caching that file upon 'do' assumedly -- based on what I've read
so far in the online 'tomes').
Also, the different environments are not accessed evenly. There's usually
one environment that receives 99% of the traffic throughout the day. So the
caching should remain pretty static.
Generating the htaccess files are no problem.
--
Devin Teske
VICOR, A Metavante Company
Systems Programmer II / Field Engineer - Wells Fargo (LAX)
dte...@vicor.com
510-735-5650 Mobile
510-621-2038 Office
This message contains confidential and proprietary information of the
sender, and is intended only for the person(s) to whom it is addressed.
Any use, distribution, copying or disclosure by any other person is
strictly prohibited. If you have received this message in error, please
notify the e-mail sender immediately, and delete the original message
without making a copy.
----- Original Message -----
From: "Alan Young" <alansyoung...@gmail.com>
To: "Devin Teske" <dte...@vicor.com>
Cc: "Michael Peters" <mpet...@plusthree.com>; <modperl@perl.apache.org>
Sent: Tuesday, October 20, 2009 4:05 PM
Subject: Re: Custom INC per-directory
Wouldn't using the Parent option (
http://perl.apache.org/docs/2.0/user/config/config.html#C_Parent_ )
work better for what you're trying to do?
--
Alan