Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: A Perl Daemon

by tomhukins (Curate)
on Sep 06, 2005 at 19:48 UTC ( #489653=note: print w/ replies, xml ) Need Help??


in reply to A Perl Daemon

Your idea sounds quite close to PPerl.


Comment on Re: A Perl Daemon
Re^2: A Perl Daemon
by habit_forming (Monk) on Sep 06, 2005 at 20:14 UTC
    Yes that is very close. But not close enough. Unfortunately I do not know what scripts need to be run and so I cannot pre-execute them. Causing all of my scripts to execute with PPerl would probably be a clean-up nightmare I'm afraid.

    --habit

      What do you mean by a cleanup nightmare? Too many daemons running that need to be cleaned up, or your code leaves too many globals around so re-executing in the same process is dangerous?

      If you are worried about too many daemons running around, then look at PersistentPerl instead (also called SpeedyCGI). The -g switch will allow you to run all your perl scripts from within the same daemon which will fork off as many child processes as you need. You can also set the child processes to die after a certain amount of inactivity.

      If it is your code that you are worried about, then no persistent environment will help you out unless you start off with a fresh interpreter everytime (or cleanup your code).

      PersistentPerl comes with an Apache module as well, which means you can save the fork of a CGI process as well when a new request comes in.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://489653]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-07-30 05:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls