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

Hi all,

Does anyone know a Perl module for interaction with Linux-HA (high-availability)? I'm doing everything using  system commands, which is not bad, but I was wondering about a package so I can do it "in the house".

Thanks!

Replies are listed 'Best First'.
Re: Perl package for Linux-HA
by moritz (Cardinal) on Dec 10, 2007 at 16:46 UTC
    How can any function be more built in than a builtin?

    Perhaps there are some operations that don't need a system call (like file tests, unlinking files etc.), but in the general case... no, nothing more "in the house".

Re: Perl package for Linux-HA
by ides (Deacon) on Dec 10, 2007 at 17:19 UTC

    Not really sure what this has to do with high availability, but you might want to look at the modules IPC::Run and IPC::Open3 to have more control over the processes you are running.

    Frank Wiles <frank@revsys.com>
    www.revsys.com

Re: Perl package for Linux-HA
by shmem (Chancellor) on Dec 11, 2007 at 09:39 UTC
    I was wondering about a package so I can do it "in the house".

    In what house? that of perl? or that of Linux HA clusters?

    For perl - if you want to have HA perl processes, one idea that comes to mind is using POE and register a watchdog session in each process on the cluster members.

    For interfacing with Linux cluster management - as mentioned, system to interface with binaries, or IPC::Open2 or IPC::Open3. Or POE again, using POE::Wheel::Run. I don't know whether there are C libraries for cluster management or (XS) perl modules which implement an interface to those.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}