kipedia.org/wiki/Topological_sorting. Each input or output is a task, dependency between tasks is determined by deployer. e.g. Deployer D has input X and output Y, hence we have 2 tasks and the dependency between them, meaning that task X needs to be finished before task Y.
@author
Ales Justin