A workflow has three tasks: Task A produces data that Task B requires, and Task C is completely independent of both A and B. Which decomposition pattern minimizes total latency?
Answer: Run A and C in parallel, then run B after A completes
C is independent of A and B, so it can start immediately. A must complete before B can start. The optimal pattern is to run A and C in parallel, then start B once A is done — C is likely finished by then. Running all three sequentially serializes independent work. Running all three in parallel would start B before A is done, which violates the data dependency. Running A first, then B and C in parallel, is correct in dependency terms but misses the opportunity to overlap A and C.