NAME

Distributed::Process::Server - a class to run the server of a Distributed::Process cluster.

SYNOPSIS

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();

DESCRIPTION

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.

Methods

listen

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.

master MASTER
master

Sets or returns the current Distributed::Process::Master object for this server, and adds it to the list of interfaces.

Attributes

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.

port

The port on which the server listens to incoming connections.

SEE ALSO

Distributed::Process::Interface, 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.

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 137:

Non-ASCII character seen before =encoding in 'Cédric'. Assuming CP1252