Distributed::Process::LocalWorker - a base class for Distributed::Process::Worker when running on the client side.
This class implements the methods declared in D::P::BaseWorker as they should work on the client side.
D::P::BaseWorker
Runs the method NAME with LIST as arguments, while measuring its run time. Returns whatever the NAME method returns and appends to the result() a string of the form:
Time for running NAME: n.nnnnn seconds
Empties the stack of results.
When called with a non-empty LIST of arguments, pushes LIST onto the stack of results. These results are meant to be sent back when the server requests them. Each line in LIST is first prepended with a timestamp of the form YYYYMMDD-HHMMSS).
YYYYMMDD-HHMMSS
When called without any arguments, returns the list of results.
Sends the command /synchro TOKEN to the server and waits until the server replies with the same /synchro command before returning. The server should reply only when all the connected clients have sent the same /synchro command. TOKEN is only a identification string, mainly useful for logging purposes.
/synchro TOKEN
/synchro
This works much the same way as synchro() but the server replies to each client one after the other, and waiting for some (configurable) time between each one. See Distributed::Process::Master for details.
Sends a /run_method command to let the server invoke the method named NAME with LIST as argument on its instance of the worker. This instance, running on the server, has its inheritance dynamically changed, so that it derives from D::P::RemoteWorker instead of D::P::LocalWorker. Besides this, all its methods are available.
/run_method
NAME
D::P::RemoteWorker
D::P::LocalWorker
When developping a subclass to D::P::Worker, one should probably create methods that run on the client and methods that run on the server. It is unlikely to need to run one of the methods on both the server side and the client side.
D::P::Worker
The following list describes the attributes of this class. They must only be accessed through their accessors. When called with an argument, the accessor methods set their attribute's value to that argument and return its former value. When called without arguments, they return the current value.
The D::P::Client object which handles the network connection for this worker.
D::P::Client
Distributed::Process::BaseWorker, Distributed::Process::RemoteWorker, Distributed::Process::Worker
Cédric Bouvier, <cbouvi@cpan.org>
<cbouvi@cpan.org>
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.
bug-distributed-process@rt.cpan.org
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:
Non-ASCII character seen before =encoding in 'Cédric'. Assuming UTF-8
To install Distributed::Process, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Distributed::Process
CPAN shell
perl -MCPAN -e shell install Distributed::Process
For more information on module installation, please visit the detailed CPAN module installation guide.