Clutch - distributed job system
# 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";
Clutch is distributed job system. like Gearman.
but Clutch no needed exclusive use daemon process.
the worker process itself receives a request.
Parallel::Prefork
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
Clutch::Client
Clutch::Worker
many code stolen from Starlet. kazuhooku++
Atsushi Kobayashi <nekokak@gmail.com>
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.
To install Clutch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Clutch
CPAN shell
perl -MCPAN -e shell install Clutch
For more information on module installation, please visit the detailed CPAN module installation guide.