An architect is designing a multi-agent system with the following dependency graph: Agent A must complete before Agents B and C can begin; Agents B and C can run concurrently; Agent D cannot start until both B and C are complete. Which coordination pattern is most appropriate?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal — the dependency graph A → {B, C} → D maps directly to the fan-out/fan-in pattern: A produces output, which fans out to B and C running concurrently (reducing total wall-clock time by running them in parallel), then D's execution is gated on both B and C completing (fan-in/barrier synchronization). This is the canonical pattern for this topology and minimizes total workflow duration.
Full explanation below image
Full Explanation
The dependency graph A → {B, C} → D maps directly to the fan-out/fan-in pattern: A produces output, which fans out to B and C running concurrently (reducing total wall-clock time by running them in parallel), then D's execution is gated on both B and C completing (fan-in/barrier synchronization). This is the canonical pattern for this topology and minimizes total workflow duration. Option A (sequential) is logically correct but suboptimal — B and C have no dependency on each other and can run in parallel, halving that phase's duration. Option C (broadcast to D) is incorrect — D must wait for B and C's processed outputs, not just A's raw output, so D cannot proceed independently. Option D (event-driven message queue) is a valid variant but adds infrastructure complexity (message queue, subscription management) beyond what's needed for this straightforward dependency pattern.