NAME

Qudo::Parallel::Manager - auto control forking manager process.

SYNOPSIS

use Qudo::Parallel::Manager;
my $manager = Qudo::Parallel::Manager->new(
    databases => [+{
        dsn      => 'dbi:SQLite:/tmp/qudo.db',
        username => '',
        password => '',
    }],
    work_delay             => 3,
    max_workers            => 5,
    min_spare_workers      => 1,
    max_spare_workers      => 5,
    max_request_par_chiled => 30,
    auto_load_worker       => 1,
    admin                  => 1,
    debug                  => 1,
);
$manager->run; # start fork and work.

# other process. get worker scoreborad.
use IO::Socket::INET;
my $sock = IO::Socket::INET->new(
    PeerHost => '127.0.0.1',
    PeerPort => 90000,
    Proto    => 'tcp',
) or die 'can not connect admin port.';

# get scoreborad
# ex) _ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
my $status = $sock->getline;
$sock->close;

DESCRIPTION

Qudo::Parallel::Manager is auto control forking manager process. and get worker scoreborad.

AUTHOR

Atsushi Kobayashi <nekokak _at_ gmail _dot_ com>

SEE ALSO

Qudo

Parallel::Prefork::SpareWorkers

IO::Socket::INET

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.