pharo-contributions / taskit

TaskIt is a library that ease Process usage in Pharo. It provides abstractions to execute and synchronize concurrent tasks, and several pre-built mechanisms that are useful for many application developers.
MIT License
43 stars 24 forks source link

Default strategy of assignment of work for workers should be a shared queue. #30

Closed sbragagnolo closed 6 years ago

sbragagnolo commented 6 years ago

Now there is an master worker that takes care about the pool, and assigns tasks to the different workers, each of them has a different queue. This leads to many problematics:

=======

A common queue would resolve all this problems, leading to an organic load balance.

guillep commented 6 years ago

Hmm, but if a worker dies while it was working on a task, it has the same problem.

This actually means that we have to keep track of:

In any case, this is not a problem of the worker, it is the problem of the worker pool :)

sbragagnolo commented 6 years ago

Yeah, I should tag this as worker pool instead of worker. For me are both in the same bag :P.

Yeah, it's mainly a deal of the worker pool, we just need to set up the same queue to each worker and its done that part.

Then change the pool worker from master to watchdog. The watchdog can staring an 'executing' queue, with task executions, so it can know the state, the task etc.

sbragagnolo commented 6 years ago

Added. Now we have two flavours of pool