NAME

Clutch - distributed job system

SYNOPSIS

# worker
package Your::Worker;
use strict;
use warnings;
use Clutch::Worker;

register_function(
    'echo' => sub {
        my $args = shift;
        $$ .':'. $args; # return worker process response.
    }
);
1;

# worker start script by single process
#! perl
use strict;
use warnings;
use Your::Worker;
Your::Worker->new(
    {
        address => "$ip:$port",
    }
)->run(); # stop by TERM signal to this process

# client script
use strict;
use warnings;
use Clutch::Client;
my $args = shift || die 'missing args';
my $client = Clutch::Client->new(
    servers => [ "$worker_ip:$worker_port" ],
);
my $res = $client->request('echo', $args);
print $res, "\n";

DESCRIPTION

Clutch is distributed job system. like Gearman.

but Clutch no needed exclusive use daemon process.

the worker process itself receives a request.

DEPENDENCIES

Parallel::Prefork

BUGS & SUPPORT

All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.

irc: #qudo@irc.perl.org

SEE ALSO

Clutch::Client

Clutch::Worker

THANKS

many code stolen from Starlet. kazuhooku++

AUTHOR

Atsushi Kobayashi <nekokak@gmail.com>

LICENSE AND COPYRIGHT

Copyright (c) 2012, Atsushi Kobayashi. All rights reserved.

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