Soru

Zorluk: KolayImplement Durable Functions

A company is building an image processing system where a user uploads a high-resolution photo, and the system needs to generate three different resized versions (thumbnail, mobile, and desktop) simultaneously. Once all three resizing tasks are finished, a final task must combine them into a single zip archive and notify the user. Which Durable Functions pattern is best suited for this workflow?

  1. Fan-out/fan-inCevap
  2. B
    Function chaining
  3. C
    Monitor
  4. D
    Human interaction

Cevap

Fan-out/fan-in
The Fan-out/fan-in pattern is the correct choice because the scenario requires executing multiple tasks (generating thumbnail, mobile, and desktop versions) in parallel and then waiting for all of them to complete before performing a final aggregation step (creating a zip archive).

Adım Adım Çözüm

1
Analyze the workflow requirements to identify concurrency.
Three resizing tasks (thumbnail, mobile, and desktop) must run simultaneously (parallel execution).
Identifying parallel tasks helps determine if a fan-out pattern is needed.
2
Analyze the dependency on the parallel tasks.
The final zipping and notification task must wait until all three resizing tasks are completed.
Waiting for multiple parallel tasks to complete before proceeding constitutes a fan-in operation.
3
Match the requirement with the correct Durable Functions pattern.
The combination of parallel execution and aggregation matches the Fan-out/fan-in pattern.
Selecting the correct pattern ensures efficient serverless workflow orchestration.

Anahtar Kavram

Durable Functions Patterns
Bu soruyu puanla