Book Image

A Developer's Guide to Building Resilient Cloud Applications with Azure

By : Hamida Rebai Trabelsi
Book Image

A Developer's Guide to Building Resilient Cloud Applications with Azure

By: Hamida Rebai Trabelsi

Overview of this book

To deliver software at a faster rate and reduced costs, companies with stable legacy systems and growing data volumes are trying to modernize their applications and accelerate innovation, but this is no easy matter. A Developer’s Guide to Building Resilient Cloud Applications with Azure helps you overcome these application modernization challenges to build secure and reliable cloud-based applications on Azure and connect them to databases with the help of easy-to-follow examples. The book begins with a basic definition of serverless and event-driven architecture and Database-as-a-Service, before moving on to an exploration of the different services in Azure, namely Azure API Management using the gateway pattern, event-driven architecture, Event Grid, Azure Event Hubs, Azure message queues, FaaS using Azure Functions, and the database-oriented cloud. Throughout the chapters, you’ll learn about creating, importing, and managing APIs and Service Fabric in Azure, and discover how to ensure continuous integration and deployment in Azure to fully automate the software delivery process, that is, the build and release process. By the end of this book, you’ll be able to build and deploy cloud-oriented applications using APIs, serverless, Service Fabric, Azure Functions, and Event Grid technologies.
Table of Contents (18 chapters)
1
Part 1: Building Cloud-Oriented Apps Using Patterns and Technologies
5
Part 2: Connecting Your Application with Azure Databases
13
Part 3: Ensuring Continuous Integration and Continuous Container Deployment on Azure

Developing Azure functions

In this section, we will discuss the key components and the structure of a function. We will see how we can create triggers and bindings and learn how we can create a function by using Visual Studio Code. We will also use Azure Functions Core Tools and connect it to the Azure service.

Azure Functions’ development

A function is composed of two important elements:

  • Your code: It can be written in any language
  • Configuration JSON file: function.json, which is generated automatically from annotations in the code

The following example presents a function.json file. We defined the triggers, bindings, and more configuration settings needed. Every function includes only one trigger. To determine the events to monitor or the workflow of the data in the input and output of a function’s execution, the runtime uses this configuration file.

The name property is used for the bound data in the function. In the following example, the...