Book Image

Azure Serverless Computing Cookbook

By : Praveen Kumar Sreeram
Book Image

Azure Serverless Computing Cookbook

By: Praveen Kumar Sreeram

Overview of this book

Microsoft provides a solution to easily run small segment of code in the Cloud with Azure Functions. Azure Functions provides solutions for processing data, integrating systems, and building simple APIs and microservices. The book starts with intermediate-level recipes on serverless computing along with some use cases on benefits and key features of Azure Functions. Then, we’ll deep dive into the core aspects of Azure Functions such as the services it provides, how you can develop and write Azure functions, and how to monitor and troubleshoot them. Moving on, you’ll get practical recipes on integrating DevOps with Azure functions, and providing continuous integration and continous deployment with Visual Studio Team Services. It also provides hands-on steps and tutorials based on real-world serverless use cases, to guide you through configuring and setting up your serverless environments with ease. Finally, you’ll see how to manage Azure functions, providing enterprise-level security and compliance to your serverless code architecture. By the end of this book, you will have all the skills required to work with serverless code architecture, providing continuous delivery to your users.
Table of Contents (11 chapters)

Implementing multithreaded reliable applications using Durable Functions

I have worked in few of the applications where parallel execution is required to perform some computing tasks. The main advantage of this approach is that you get the desired output pretty quickly depending on the subthreads that you create. It could be achieved in multiple ways using different technologies. However the challenge in these approaches is that if something goes wrong in the middle of any of the subthread it's not easy to self-heal and resume from where it was stopped. I'm sure many of you might have faced similar problems in your application as it is a very common business case.

In this recipe, we will try to implement a simple way of executing a function in parallel with multiple instances using the Durable Functions for the following scenario.

Assume that we have five customers ...