You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Bill Desjardins <bi...@carracing.com> on 2000/11/05 23:57:14 UTC

Re: Forking in mod_perl?

Hello,

I have been working with this exact subject for the past couple weeks and
becnhmarking lots of results. Although I dont have the results here to
show, we have decided to use PVM (
http://www.epm.ornl.gov/pvm/pvm_home.html ) to spawn subprocces on other
machines and also on the same machine. We do many very comptuational
intensive tasks based on user input and we spawn these off to other
machines, as well as the local machine to do the processing. Although we
do not provide the results instantly, the user can come back or click on a
link and see waht the satus of the process is doing. There is a perl
module that we use in CPAN called Parallel::Pvm that interfaces with the
PVM Virtual Machine software. We have tested it in doing heavy database
work as well computationl intensive tasks, and the remote process
reliability is excellent. It also has the capabilities of talking to other
spawned processes on other machines if necessary. We are in a RH6.2 Linux
environment (Works on FreeBSD also :), but the PVM software runs on many
architectures. In a single server setup, you still get the abiltiy to
spawn a process locally, so you will still get the benefit of off-loading
the heavy process from mod_perl.

Hope this helps.

Bill

-- 
Bill Desjardins - bill@carracing.com - (USA) 305.205.8644 
Unix/Network Administration - Perl/Mod_Perl/DB Development
     http://www.CarRacing.com - Powered by mod_perl!
FREE WebHosting for Race Tracks, Race Teams and Race Shops

On Wed, 4 Oct 2000, David E. Wheeler wrote:

> Hi All,
> 
> Quick question - can I fork off a process in mod_perl? I've got a piece
> of code that needs to do a lot of processing that's unrelated to what
> shows up in the browser. So I'd like to be able to fork the processing
> off and return data to the browser, letting the forked process handle
> the extra processing at its leisure. Is this doable? Is forking a good
> idea in a mod_perl environment? Might there be another way to do it?
> 
> TIA for the help!
> 
> David
> 
>