NAME
Distributed::Process::Worker - a base class for a worker
SYNOPSIS
package MyWorker;
use Distributed::Process::Worker;
our @ISA = qw/ Distributed::Process::Worker /;
sub run {
my $self = shift;
# do useful stuff
}
1;
DESCRIPTION
The tasks that one wishes to run distributedly must be implemented in the run() method of a class derived from Distributed::Process::Worker
. By default, this in turn derives from Distributed::Process::LocalWorker
, so the custom class also derives from it, and can run "as is" on the client side.
On the server side, the Distributed::Process::Master
object changes the inheritance of Distributed::Process::Worker
to make it a subclass of Distributed::Process::RemoteWorker
. The custom worker class thus also becomes a subclass of it, and is ready to run on the server.
Methods
- go_remote
-
This is called by the
D::P::Master
object to change the inheritance and redefind the run() method. run() on the server does not actually run the tasks defined in the custom worker class, but sends a/run
command on the netork to the connected client.
SEE ALSO
Distributed::Process::LocalWorker, Distributed::Process::RemoteWorker, Distributed::Process::Master
AUTHOR
Cédric Bouvier, <cbouvi@cpan.org>
BUGS
Please report any bugs or feature requests to bug-distributed-process@rt.cpan.org
, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2005 Cédric Bouvier, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 71:
Non-ASCII character seen before =encoding in 'Cédric'. Assuming UTF-8