Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Looking for a 'watchdog' module

by mvandenb (Beadle)
on May 24, 2005 at 14:10 UTC ( [id://459980]=perlquestion: print w/replies, xml ) Need Help??

mvandenb has asked for the wisdom of the Perl Monks concerning the following question:

Esteemed monks,

I searched CPAN, but could not find what I need.
I'm looking for a module to which I could pass a sub ref and a number. That module would then fork that number of processes, which would execute the passed sub ref.
I need that module to restart a process with the same sub, should it die.

Ideally, this module would also allow me to modify the number of processes at runtime, a bit like Log::Log4perl's behavior can be changed on the fly by changing a configuration file.

Does anyone know if such a module exists ?

Thanks in advance for your wise advice.

Replies are listed 'Best First'.
Re: Looking for a 'watchdog' module
by robartes (Priest) on May 24, 2005 at 14:32 UTC

    A quick scan of CPAN reveals Parallel::ForkManager. This should go some ways towards your goal. You can implement the watchdog behaviour using the callbacks featured in that module, but a cursory glance at the docs does not reveal a way to modify the number of children during runtime, so I'm afraid this module might not help you there

    CU
    Robartes-

Re: Looking for a 'watchdog' module
by deibyz (Hermit) on May 24, 2005 at 15:37 UTC
    Don't know if can be what you need, but you can have a look at POE.
Re: Looking for a 'watchdog' module
by herveus (Prior) on May 24, 2005 at 17:27 UTC
    Howdy!

    Net::Server may also suffice, if you run in the pre-forking mode.

    yours,
    Michael

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://459980]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-29 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found