Soru

Zorluk: KolayImplement Durable Functions

You are developing a user onboarding workflow using Azure Durable Functions. The workflow must execute three tasks in sequence: first, create the user profile in a database; second, generate a welcome PDF document; and third, send a welcome email containing the PDF. The output of each task is required as the input for the subsequent task.

Which Durable Functions pattern should you use to implement this workflow?

  1. Function chainingCevap
  2. B
    Fan-out/fan-in
  3. C
    Async HTTP APIs
  4. D
    Monitor

Cevap

Function chaining
Function chaining is the correct pattern because it represents a workflow where functions are executed sequentially, and the output of one function is directly passed as the input to the next function. This matches the requirements of creating a profile, generating a PDF from the profile details, and then emailing the generated PDF.

Adım Adım Çözüm

1
Analyze the workflow requirements to identify the execution flow and dependencies between tasks.
The workflow requires executing three tasks sequentially where the output of each task is required as the input for the next task.
This establishes a clear sequential dependency chain represented as F1F2F3F_1 \rightarrow F_2 \rightarrow F_3.
2
Compare the requirements against standard Azure Durable Functions patterns.
Function chaining is designed specifically to execute a sequence of functions in a helper topology where output feeds into input, whereas Fan-out/fan-in handles parallelization and Monitor handles polling.
Choosing the pattern that natively supports sequential data passing reduces complexity and matches architectural best practices.

Anahtar Kavram

Durable Functions Patterns - Function Chaining
Tahmini Süre:45s
Bu soruyu puanla