You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Brian Ferris <bd...@unity.ncsu.edu> on 2001/03/03 18:30:06 UTC
Dynamic loading of development libraries
I'm currently a developer for an on-line publication using Apache /
mod_perl / Mason. We currently have about six developers working on the
project and I have been running into problems with concurrent work on the
Perl libraries that power our site.
We use CVS to manage revisions, but the only way for a developer to see if
their code is working is to run it on our webserver. However, mod_perl's
very purpose is to keep one copy of your modules loaded from the
start. StatINC addresses this problem to a certain extent, but it fails
when you have multiple versions of a Perl module that you want to load
depending on which user is requesting.
I sort of got around this by modifying my Mason handler to examine the
requested URI ( ex. /dev/user_name/blah.html ) and loading the appropriate
module for that user. Basically, this involved modifying the @INC
paths in the handler, requiring the modules, and then calling
the StatINC handler sub to reload any modified modules. This sort
of screams hack and it never worked that well. Processes would
load the proper module for one user, and then use that same module
to serve another user who was looking for his own modules. Chaos
ensued...
I have a few ideas as to what I should try next. Perhaps limiting
RequestsPerChild to 1, such that libraries don't get reused? I don't know
what the ramifications of this are.
Short of running a webserver for each user (a bad solution in my
opinion) does anyone have ideas?
Thanks,
Brian Ferris
Re: Dynamic loading of development libraries
Posted by Steven Lembark <le...@wrkhors.com>.
> I'm currently a developer for an on-line publication using Apache /
> mod_perl / Mason. We currently have about six developers working on the
> project and I have been running into problems with concurrent work on the
> Perl libraries that power our site.
>
> We use CVS to manage revisions, but the only way for a developer to see if
> their code is working is to run it on our webserver. However, mod_perl's
> very purpose is to keep one copy of your modules loaded from the
> start. StatINC addresses this problem to a certain extent, but it fails
> when you have multiple versions of a Perl module that you want to load
> depending on which user is requesting.
>
> I sort of got around this by modifying my Mason handler to examine the
> requested URI ( ex. /dev/user_name/blah.html ) and loading the appropriate
> module for that user. Basically, this involved modifying the @INC
> paths in the handler, requiring the modules, and then calling
> the StatINC handler sub to reload any modified modules. This sort
> of screams hack and it never worked that well. Processes would
> load the proper module for one user, and then use that same module
> to serve another user who was looking for his own modules. Chaos
> ensued...
>
> I have a few ideas as to what I should try next. Perhaps limiting
> RequestsPerChild to 1, such that libraries don't get reused? I don't know
> what the ramifications of this are.
>
> Short of running a webserver for each user (a bad solution in my
> opinion) does anyone have ideas?
>
you can update your httpd.conf to vary the port number based on
who is starting the thing. this gives you something like:
<perl>
...
%portlist = qw( jow 8081 bloe 8082 john 8083 doe 8084 );
$Port = $portlist{$ENV{LOGNAME}} or die "no port for $ENV{$LOGNAME}";
to check out a new version just bounce your copy of the
server and keep going. normal cycle looks something like
cvs -q update -d;
bounce;
try it, edit thing, keep going. if you reach a point where
something works use cvs commit.
--
Steven Lembark 2930 W. Palmer St.
Chicago, IL 60647
lembark@wrkhors.com 800-762-1582
RE: Dynamic loading of development libraries
Posted by Stathy Touloumis <st...@edventions.com>.
Or set MaxClients to 1 if you do not have too many developers and/or your
development server doesn't suck ; )
> There are 2 realistic solutions to your problem :
>
> 1. run a web server for each user ( a good solution in my opinion )
> 2. wait for Doug to finish up mod_perl 2.0
>
> I know the problem you have with development + mod_perl, and
> honestly, these
> are the only avaliable options.
Re: Dynamic loading of development libraries
Posted by "Philippe M . Chiasson" <go...@cpan.org>.
On Sat, Mar 03, 2001 at 12:30:06PM -0500, Brian Ferris wrote:
> I'm currently a developer for an on-line publication using Apache /
> mod_perl / Mason. We currently have about six developers working on the
> project and I have been running into problems with concurrent work on the
> Perl libraries that power our site.
>
> We use CVS to manage revisions, but the only way for a developer to see if
> their code is working is to run it on our webserver. However, mod_perl's
> very purpose is to keep one copy of your modules loaded from the
> start. StatINC addresses this problem to a certain extent, but it fails
> when you have multiple versions of a Perl module that you want to load
> depending on which user is requesting.
>
> I sort of got around this by modifying my Mason handler to examine the
> requested URI ( ex. /dev/user_name/blah.html ) and loading the appropriate
> module for that user. Basically, this involved modifying the @INC
> paths in the handler, requiring the modules, and then calling
> the StatINC handler sub to reload any modified modules. This sort
> of screams hack and it never worked that well. Processes would
> load the proper module for one user, and then use that same module
> to serve another user who was looking for his own modules. Chaos
> ensued...
>
> I have a few ideas as to what I should try next. Perhaps limiting
> RequestsPerChild to 1, such that libraries don't get reused? I don't know
> what the ramifications of this are.
>
> Short of running a webserver for each user (a bad solution in my
> opinion) does anyone have ideas?
There are 2 realistic solutions to your problem :
1. run a web server for each user ( a good solution in my opinion )
2. wait for Doug to finish up mod_perl 2.0
I know the problem you have with development + mod_perl, and honestly, these
are the only avaliable options.
> Thanks,
> Brian Ferris
>
>
--
+-----------------------------------------------+
| Philippe M. Chiasson <go...@cpan.org> |
| SmartWorker http://www.smartworker.org |
| |
| VI VI VI The editor of the beast. |
+-----------------------------------------------+
Hope to see you at my presentation at ApacheCon2001
at yhe Santa Clara Convention Center, 5001 Great America
Parkway, Santa Clara, CA 95054 http://www.apachecon.com/
perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl Hacker!\n$/&&print||$$++&&redo}'
Re: Microsoft's Remote Scripting - modperl equivalent?
Posted by Gunther Birznieks <gu...@extropia.com>.
http://www.gunther.web66.com/JavaCGIBridge/
At 06:23 PM 3/3/01 +0000, Nigel Hamilton wrote:
>Hi,
>
> Microsoft's Remote Scripting allows Javascript events to be passed
>to an Applet which in turn calls a server-side function.
>
> One advantage: form validation can happen without the need to load
>a new page.
>
> There are two parts to it - the Javascript->Applet interface and
>the Applet->ModPerl connection.
>
> Is there a mod_perl module out there that does this? If not, is
>such a thing useful?
>
>Regards,
>
>NIge
>
>
>Nigel Hamilton
>______________________________________________________________________________
>http://turbo10.com Turbo10 Search Engine Search Fast. Browse Faster.
__________________________________________________
Gunther Birznieks (gunther.birznieks@extropia.com)
eXtropia - The Web Technology Company
http://www.extropia.com/
Microsoft's Remote Scripting - modperl equivalent?
Posted by Nigel Hamilton <ni...@e1mail.com>.
Hi,
Microsoft's Remote Scripting allows Javascript events to be passed
to an Applet which in turn calls a server-side function.
One advantage: form validation can happen without the need to load
a new page.
There are two parts to it - the Javascript->Applet interface and
the Applet->ModPerl connection.
Is there a mod_perl module out there that does this? If not, is
such a thing useful?
Regards,
NIge
Nigel Hamilton
______________________________________________________________________________
http://turbo10.com Turbo10 Search Engine Search Fast. Browse Faster.
Re: Dynamic loading of development libraries
Posted by Stas Bekman <st...@stason.org>.
On Sat, 3 Mar 2001, Brian Ferris wrote:
> I'm currently a developer for an on-line publication using Apache /
> mod_perl / Mason. We currently have about six developers working on the
> project and I have been running into problems with concurrent work on the
> Perl libraries that power our site.
>
> We use CVS to manage revisions, but the only way for a developer to see if
> their code is working is to run it on our webserver. However, mod_perl's
> very purpose is to keep one copy of your modules loaded from the
> start. StatINC addresses this problem to a certain extent, but it fails
> when you have multiple versions of a Perl module that you want to load
> depending on which user is requesting.
See Apache::PerlVINC
It's also covered in the guide
> I sort of got around this by modifying my Mason handler to examine the
> requested URI ( ex. /dev/user_name/blah.html ) and loading the appropriate
> module for that user. Basically, this involved modifying the @INC
> paths in the handler, requiring the modules, and then calling
> the StatINC handler sub to reload any modified modules. This sort
> of screams hack and it never worked that well. Processes would
> load the proper module for one user, and then use that same module
> to serve another user who was looking for his own modules. Chaos
> ensued...
>
> I have a few ideas as to what I should try next. Perhaps limiting
> RequestsPerChild to 1, such that libraries don't get reused? I don't know
> what the ramifications of this are.
>
> Short of running a webserver for each user (a bad solution in my
> opinion) does anyone have ideas?
>
> Thanks,
> Brian Ferris
>
_____________________________________________________________________
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://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
RE: Dynamic loading of development libraries
Posted by Rob Bloodgood <ro...@empire2.com>.
> I'm currently a developer for an on-line publication using Apache /
> mod_perl / Mason. We currently have about six developers working on the
> project and I have been running into problems with concurrent work on the
> Perl libraries that power our site.
Just a few days ago, somebody suggested http://www.freevsd.org/ as a
solution for this kind of situation. I've reviewed it briefly, and it
appears to be able to do alot of what you seem to need.
Good luck!
L8r,
Rob