Distributed::Process::Server - a class to run the server of a Distributed::Process cluster.
use Distributed::Process; use Distributed::Process::Master; use Distributed::Process::Server; use MyTest; $m = new Distributed::Process::Master ... ; $s = new Distributed::Process::Server -master => $m, -port => 8147; $s->listen();
This class handles the server part of the cluster.
It maintains an internal list of Interface objects, one of which is the Master. The Master object must be instanciated and declared with the Server before the listen() method is invoked.
The listen() method will welcome incoming connections and declare them with the Master as new Workers. Commands received on theses sockets will be handled by the handle_line() method of the corresponding Interface, be it a Worker or the Master.
Starts listening on port(), waiting for incoming connections. If a new connection is made, it is supposed to be from a Worker, and the handle is thus passed on to the Master, by means of its add_worker() method.
When the master has_enough_workers(), the Server stops welcoming new connections and launches the Master's listen() method.
Sets or returns the current Distributed::Process::Master object for this server, and adds it to the list of interfaces.
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 port on which the server listens to incoming connections.
Distributed::Process::Interface, Distributed::Process::Master,
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 CP1252
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.