Skip to content

Perhaps another multiple worker daemon example? #1

@tomwitt2

Description

@tomwitt2

First, I wanted to say thank you very much for these examples. They have been invaluable to me. I truly appreciate the code you've provided.

In particular, I found 5-daemon-multiple-worker to be the most helpful. I notice that this example relies on the worker processes to manage their own work loads. I'd be very interested in an example that might show multiple workers with one coordinating master process doling out the incoming work.

My particular use case is to monitor a queue and dispatch work units to workers. For, 5-daemon-multiple-worker, each worker will need to make a connection to the queue and pull the work for it's process. Ideally, a master process might keep track of how many workers are currently working then start a new worker process for incoming units of work as older worker processes finish and die. This way, only the master process is reading off the queue and it would be possible to increase/decrease the number of workers by sending signals to the process to dynamically tailor the work load without restarting the process.

I don't (yet) know how to write such a beast but I'm going to be trying.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions