...
We shall assign tasks in the order of: active, learner and standby. The assignment will be broken down into following steps: (couldn‘t get latex formatting to work)
Code Block | ||
---|---|---|
| ||
Algorithm incremental-rebalancing Input Set of Tasks T, Set of Instances C, Set of Workers W, Where each worker w contains: Set of active Tasks Ta, Set of standby Tasks Ts, owned by which instance c Output Finalized Task Assignment |
Assign active stateful tasks:
- Assign to learner tasks that indicates "ready"
- Assign to previous owners
- Assign to unready learner tasks owners
- Assign to resource available hosts
Assign active stateless tasks:
Same as above steps 2, 4
Assign learner tasks:
...
Main loop:
Separate out Tasks into stateful tasks and stateless tasks
Assign Stateful active tasks:
To instances with learner tasks that indicates "ready"
To previous owners
To unready learner tasks owners
To instances with standby tasks
To resource available instances
Assign Stateless tasks:
To previous owners
To instances with standby tasks
To resource available instances
Assign learner tasks:
To previous owners (no half way bounce at least in the first version)
To new coming instances with abundant resource (first version)
Move tasks out of heaviest loaded instances first
Assign standby tasks:
To instances without matching active tasks
To previous active task owners
To resource available instances
Output Finalized Task Assignment |
As long as the group members/ number of tasks are not changing, there should be a defined balanced stage instead of forever rebalancing.
Instances with standby tasks have higher priority to be chosen as learner task assignor. The standby task will convert to learner task immediately
...
Assign standby tasks:
...
.
Also for the smooth delivery of all the features we have discussed so far, an iteration plan of algorithm is as below:
...