It is an extension to Azure Functions which can help us perform stateful execution of code in a serverless compute environment. The extension lets us define stateful workflows with a definite input and output by writing orchestrator functions and stateful entities using the Azure programming model. Azure manages everything behind the scenes like extension states, checkpoints and restarts allowing the developers to focus only on the logic. This is synonymous to Step Functions in AWS.
As can be seen in the above image, we can chain Functions to execute in specific order concisely. Here, the output of one function is acting as an input to the subsequent function. We also have the flexibility to implement control flows by using imperative coding constructs. Control flow semantics like conditionals and loops, try/catch and finally blocks can be implemented in this pattern.
In this pattern, we executed multiple functions in parallel and then wait for all the functions to finish. Often, some aggregation work is done on the results that are returned from the functions. Fan Out can be easily achieved by sending out multiple messages to a single queue. Fan In can be challenging in a normal function as we need to write the code to track when queue triggered functions end and store their output.