You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Gunther Birznieks <gu...@extropia.com> on 2000/05/17 09:13:46 UTC

Re: multiple copies of a module

I am curious as to why you don't care for 20 different apaches? If you use 
a mod_proxy front-end, it should be relatively easy to manage 20 different 
apache's on the backend, especially if you use variables to start them 
up.  There is another command line parameter that can be used to trigger 
different code in the same conf file (so that they start on different ports 
for example)...

In addition, a solid part of testing mod_perl modules consists of running 
in single process mode (ala -x parameter)) -- which is invaluable for 
finding cached code conflicts.. You won't be able to do this if everyone is 
using the same apache.

BTW, this would be a good addition to the guide -- how to manage a mod_perl 
development environment with more than 1 developer (eg 20 in your case)

Later,
    Gunther

At 08:35 AM 5/17/00 +0100, Kees Vonk 7249 24549 wrote:
>I have the requirement to set up a number of testing
>environments on the same machine, in order to prevent having
>to run 20 copies of apache I want to try to do this using
>virtual hosts. The problem I am running into is that it is
>very likely that there will be different copies of the same
>in-house modules in the different environments. With the
>modules being cached in memory this causes some problems.
>
>The only way I can think of is to have the different modules
>in different packages, however this would mean I would have
>to change the scripts and modules every time they are
>deployed in order to make them match the environment.
>
>I have a environment variable with a unique environment name
>under every virtual host, so I wondered if I could do
>something like:
>
>script:   use My::$ENV{ENVNAME}::Module;
>
>module:   package My::$ENV{ENVNAME}::Module;
>
>
>Could anyone tell me if this is possible in any way as I
>cannot get it to work, or if there is another way of
>achieving this.
>
>
>Kees

__________________________________________________
Gunther Birznieks (gunther.birznieks@extropia.com)
Extropia - The Web Technology Company
http://www.extropia.com/


Re: multiple copies of a module

Posted by Stas Bekman <sb...@stason.org>.
On Wed, 17 May 2000, Gunther Birznieks wrote:

> At 11:18 AM 5/17/00 +0300, Stas Bekman wrote:
> >On Wed, 17 May 2000, Gunther Birznieks wrote:
> >
> > > I am curious as to why you don't care for 20 different apaches? If you use
> > > a mod_proxy front-end, it should be relatively easy to manage 20 different
> > > apache's on the backend, especially if you use variables to start them
> > > up.  There is another command line parameter that can be used to trigger
> > > different code in the same conf file (so that they start on different 
> > ports
> > > for example)...
> > >
> > > In addition, a solid part of testing mod_perl modules consists of running
> > > in single process mode (ala -x parameter)) -- which is invaluable for
> > > finding cached code conflicts.. You won't be able to do this if 
> > everyone is
> > > using the same apache.
> > >
> > > BTW, this would be a good addition to the guide -- how to manage a 
> > mod_perl
> > > development environment with more than 1 developer (eg 20 in your case)
> >
> >Both questions are already answered in the guide:
> >
> >Kees' original:
> >http://perl.apache.org/guide/modules.html#Apache_PerlVINC_set_a_differe
> >
> >Gunter's suggestion:
> >http://perl.apache.org/guide/control.html#Starting_a_Personal_Server_for_E
> 
> :)
> 
> Excellent!
> 
> One thing though is that both these suggestions actually tie together to 
> solve a practical problem: Managing Multiple Developers yet are located in 
> two different chapters.  I think these sections belong where they do, but 
> perhaps a separate discussion linking these sections (and any other 
> relevant ones) would be useful.

These two are disconnected in fact. Since when you develop the code you
need just a few processes per developer, you start a separate server for
each developer -- and that's what the last link suggests. It shows how to
use the front end machine to solve the problem when all the servers are
running on the same machine.

There is no reason of runing vurtual hosts for each developer, different
ports solve this issue much better and simpler.

Of course I'd be glad to document other approaches if you will to share.


_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
mailto:stas@stason.org   http://perl.org     http://stason.org/TULARC
http://singlesheaven.com http://perlmonth.com http://sourcegarden.org


Re: multiple copies of a module

Posted by Gunther Birznieks <gu...@extropia.com>.
At 11:18 AM 5/17/00 +0300, Stas Bekman wrote:
>On Wed, 17 May 2000, Gunther Birznieks wrote:
>
> > I am curious as to why you don't care for 20 different apaches? If you use
> > a mod_proxy front-end, it should be relatively easy to manage 20 different
> > apache's on the backend, especially if you use variables to start them
> > up.  There is another command line parameter that can be used to trigger
> > different code in the same conf file (so that they start on different 
> ports
> > for example)...
> >
> > In addition, a solid part of testing mod_perl modules consists of running
> > in single process mode (ala -x parameter)) -- which is invaluable for
> > finding cached code conflicts.. You won't be able to do this if 
> everyone is
> > using the same apache.
> >
> > BTW, this would be a good addition to the guide -- how to manage a 
> mod_perl
> > development environment with more than 1 developer (eg 20 in your case)
>
>Both questions are already answered in the guide:
>
>Kees' original:
>http://perl.apache.org/guide/modules.html#Apache_PerlVINC_set_a_differe
>
>Gunter's suggestion:
>http://perl.apache.org/guide/control.html#Starting_a_Personal_Server_for_E

:)

Excellent!

One thing though is that both these suggestions actually tie together to 
solve a practical problem: Managing Multiple Developers yet are located in 
two different chapters.  I think these sections belong where they do, but 
perhaps a separate discussion linking these sections (and any other 
relevant ones) would be useful.


__________________________________________________
Gunther Birznieks (gunther.birznieks@extropia.com)
Extropia - The Web Technology Company
http://www.extropia.com/


Re: multiple copies of a module

Posted by Stas Bekman <sb...@stason.org>.
> Stas Bekman wrote:
> > 
> > Both questions are already answered in the guide:
> > 
> > Kees' original:
> > http://perl.apache.org/guide/modules.html#Apache_PerlVINC_set_a_differe
> > 
> > Gunter's suggestion:
> > http://perl.apache.org/guide/control.html#Starting_a_Personal_Server_for_E
> > 
> 
> Thank you very much this is very helpful (I love the guide, even though it 
> sometimes difficult to find something in it).

Hold on, at this very moment a few mod_perl fellas are working on having a
good search engine for the guide. Just give it some more time, I'm trying
to bring the best so it'll take a while...

> I think would like to go the Apache::PerlVINC way, as our testing box is very 
> heavily loaded (due to all kinds of non-apache testing going on). I would 
> never get permission to start 20 apache servers.
> 
> However the URL in the guide:
>  http://perl.apache.org/~dougm/Apache-PerlVINC-0.01.tar.gz
> 
> does not exist, is there any other place where I can find Apache::PerlVINC?

Indeed, it's not there. Doug?


_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
mailto:stas@stason.org   http://perl.org     http://stason.org/TULARC
http://singlesheaven.com http://perlmonth.com http://sourcegarden.org


Re: multiple copies of a module

Posted by Doug MacEachern <do...@covalent.net>.
On Wed, 17 May 2000, Kees Vonk 7249 24549 wrote:
 
> However the URL in the guide:
>  http://perl.apache.org/~dougm/Apache-PerlVINC-0.01.tar.gz
> 
> does not exist, is there any other place where I can find Apache::PerlVINC?

it's there now.  and, a reminder from when it was first posted, it's not
on cpan because it needs a maintainer (besides me :), anybody interested?


Re: multiple copies of a module

Posted by Kees Vonk 7249 24549 <KE...@BGTRANSCO.CO.UK>.
Stas Bekman wrote:
> 
> Both questions are already answered in the guide:
> 
> Kees' original:
> http://perl.apache.org/guide/modules.html#Apache_PerlVINC_set_a_differe
> 
> Gunter's suggestion:
> http://perl.apache.org/guide/control.html#Starting_a_Personal_Server_for_E
> 

Thank you very much this is very helpful (I love the guide, even though it 
sometimes difficult to find something in it).

I think would like to go the Apache::PerlVINC way, as our testing box is very 
heavily loaded (due to all kinds of non-apache testing going on). I would 
never get permission to start 20 apache servers.

However the URL in the guide:
 http://perl.apache.org/~dougm/Apache-PerlVINC-0.01.tar.gz

does not exist, is there any other place where I can find Apache::PerlVINC?


Thanks,


Kees


Re: multiple copies of a module

Posted by Stas Bekman <sb...@stason.org>.
On Wed, 17 May 2000, Gunther Birznieks wrote:

> I am curious as to why you don't care for 20 different apaches? If you use 
> a mod_proxy front-end, it should be relatively easy to manage 20 different 
> apache's on the backend, especially if you use variables to start them 
> up.  There is another command line parameter that can be used to trigger 
> different code in the same conf file (so that they start on different ports 
> for example)...
> 
> In addition, a solid part of testing mod_perl modules consists of running 
> in single process mode (ala -x parameter)) -- which is invaluable for 
> finding cached code conflicts.. You won't be able to do this if everyone is 
> using the same apache.
> 
> BTW, this would be a good addition to the guide -- how to manage a mod_perl 
> development environment with more than 1 developer (eg 20 in your case)

Both questions are already answered in the guide:

Kees' original:
http://perl.apache.org/guide/modules.html#Apache_PerlVINC_set_a_differe

Gunter's suggestion:
http://perl.apache.org/guide/control.html#Starting_a_Personal_Server_for_E


> 
> Later,
>     Gunther
> 
> At 08:35 AM 5/17/00 +0100, Kees Vonk 7249 24549 wrote:
> >I have the requirement to set up a number of testing
> >environments on the same machine, in order to prevent having
> >to run 20 copies of apache I want to try to do this using
> >virtual hosts. The problem I am running into is that it is
> >very likely that there will be different copies of the same
> >in-house modules in the different environments. With the
> >modules being cached in memory this causes some problems.
> >
> >The only way I can think of is to have the different modules
> >in different packages, however this would mean I would have
> >to change the scripts and modules every time they are
> >deployed in order to make them match the environment.
> >
> >I have a environment variable with a unique environment name
> >under every virtual host, so I wondered if I could do
> >something like:
> >
> >script:   use My::$ENV{ENVNAME}::Module;
> >
> >module:   package My::$ENV{ENVNAME}::Module;
> >
> >
> >Could anyone tell me if this is possible in any way as I
> >cannot get it to work, or if there is another way of
> >achieving this.
> >
> >
> >Kees
> 
> __________________________________________________
> Gunther Birznieks (gunther.birznieks@extropia.com)
> Extropia - The Web Technology Company
> http://www.extropia.com/
> 
> 



_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
mailto:stas@stason.org   http://perl.org     http://stason.org/TULARC
http://singlesheaven.com http://perlmonth.com http://sourcegarden.org