NAME
Spread::Queue::ManagedWorker - utility class for Spread::Queue::Manager
DESCRIPTION
Tracks each worker that is registered with the queue manager. Retains worker state.
Eventually add activity metrics (# messages assigned, uptime, utilization, etc.).
States are:
- ready - available for task assignment
-
Worker controls this by sending a 'ready' message to the queue manager.
- assigned - allocated to a task
-
Set by manager, after a message is transmitted to a ready worker.
- acknowledged - worker is working on a task
-
When a 'working' message is received from an assigned worker.
- terminated - no longer available for task assignment
-
'terminated' message has been received from worker, or an expected status update has not been received so queue manager marks the worker as dead.
If an assigned worker is terminated, then the task that was assigned to that worker will be re-assigned to another worker.
METHODS
AUTHOR
Jason W. May <jmay@pobox.com>
COPYRIGHT
Copyright (C) 2002 Jason W. May. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The license for the Spread software can be found at http://www.spread.org/license
SEE ALSO
L<Spread::Queue>