Azure Serverless Computing Cookbook

Author: Praveen Kumar Sreeram  

Publisher: Packt Publishing‎

Publication year: 2017

E-ISBN: 9781788392594

P-ISBN(Paperback): 9781788390828

Subject: F224-39 computer applications

Keyword: 电子计算机的应用

Language: ENG

Access to resources Favorite

Disclaimer: Any content in publications that violate the sovereignty, the constitution or regulations of the PRC is not accepted or approved by CNPIEC.

Azure Serverless Computing Cookbook

Description

Over 50 recipes to help you build applications hosted on Serverless architecture using Azure Functions. About This Book • Enhance Azure Functions with continuous deployment using Visual Studio Team Services • Learn to deploy and manage cost-effective and highly available serverless applications using Azure Functions • This recipe-based guide will teach you to build a robust serverless environment Who This Book Is For If you are a Cloud administrator, architect, or developer who wants to build scalable systems and deploy serverless applications with Azure functions, then this book is for you. Prior knowledge and hands-on experience with core services of Microsoft Azure is required. What You Will Learn • Develop different event-based handlers supported by serverless architecture supported by Microsoft Cloud Platform – Azure • Integrate Azure Functions with different Azure Services to develop Enterprise-level applications • Get to know the best practices in organizing and refactoring the code within the Azure functions • Test, troubleshoot, and monitor the Azure functions to deliver high-quality, reliable, and robust cloud-centric applications • Automate mundane tasks at various levels right from development to deployment and maintenance • Learn how to develop statefulserverless applications and also self-healing jobs using DurableFunctions In Detail Microsoft provides a solution to easily run small segment of code in the Cloud with Azure Functions. Azure Functions prov

Chapter

Chapter 1: Accelerate Your Cloud Application Development Using Azure Function Triggers and Bindings

Introduction

Building a backend Web API using HTTP triggers

Getting ready

How to do it…

How it works…

See also

Persisting employee details using Azure Storage table output bindings

Getting ready

How to do it...

How it works...

Understanding more about Storage Connection

What is Azure Table storage service?

Partition key and row key

There's more...

Saving the profile images to Queues using Queue output bindings

Getting ready

How to do it…

How it works…

There's more…

See also

Storing the image in Azure Blob storage

Getting ready

How to do it...

How it works...

There's more...

See also...

Cropping an image using ImageResizer trigger

Getting ready

How to do it...

How it works...

See also

Chapter 2: Working with Notifications Using SendGrid and Twilio Services

Introduction

Sending an email notification to the administrator of the website using the SendGrid service

Getting ready

Creating a SendGrid account

Generating the SendGrid API key

Configuring the SendGrid API key with the Azure Function app

How to do it...

How it works...

See also

Sending an email notification to the end user dynamically

Getting ready

How to do it...

How it works...

There's more...

See also

Implementing email logging in the Blob storage

How to do it...

How it works...

Modifying the email content to include an attachment

Getting ready

How to do it...

Customizing the log file name using IBinder interface

Adding an attachment to the email

There's more...

Sending SMS notification to the end user using the Twilio service

Getting ready

How to do it...

How it works...

Chapter 3: Seamless Integration of Azure Functions with Other Azure Services

Introduction

Using Cognitive Services to locate faces from the images

Getting ready

Creating a new Computer Vision API account

Configuring App settings

How to do it...

How it works...

There's more...

Azure SQL Database interactions using Azure Functions

Getting ready

How to do it...

How it works...

Processing a file stored in OneDrive using an external file trigger

Getting ready

How to do it...

Monitoring tweets using Logic Apps and notifying when popular users tweet

Getting ready

How to do it...

Create a new Logic App

Designing the Logic App with Twitter and Gmail connectors

Testing the Logic App functionality

How it works...

See also

Integrating Logic Apps with Azure Functions

Getting ready

How to do it...

There's more...

See also

Chapter 4: Understanding the Integrated Developer Experience of Visual Studio Tools for Azure Functions

Introduction

Creating the function app using Visual Studio 2017

Getting ready

How to do it...

How it works...

There's more...

Debugging C# Azure Functions on a local staged environment using Visual Studio 2017

Getting ready

How to do it...

How it works...

There's more...

Connecting to the Azure Cloud storage from local Visual Studio environment

Getting ready

How to do it...

How it works...

There's more...

See also

Deploying the Azure Function app to Azure Cloud using Visual Studio

How to do it...

There's more...

See also

Debugging live C# Azure Function hosted on the Microsoft Azure Cloud environment using Visual Studio

Getting ready

How to do it...

See also

Chapter 5: Exploring Testing Tools for the Validation of Azure Functions

Introduction

Testing Azure Functions

Getting ready

How to do it...

Testing HTTP triggers using Postman

Testing Blob trigger using the Microsoft Storage Explorer

Testing Queue trigger using the Azure Management portal

There's more...

Testing an Azure Function on a staged environment using deployment slots

How to do it...

There's more

Load testing Azure Functions using VSTS

Getting ready

How to do it...

There's more...

See also

Creating and testing Azure Function locally using Azure CLI tools

Getting ready

How to do it...

Testing and validating Azure Function responsiveness using Application Insights

Getting ready

How to do it...

How it works...

There's more...

Chapter 6: Monitoring and Troubleshooting Azure Serverless Services

Introduction

Monitoring your Azure Functions

Getting ready

How to do it...

There's more...

Monitoring Azure Functions using Application Insights

Getting ready

How to do it...

How it works...

There's more ...

Pushing custom telemetry details to analytics of Application Insights

Getting ready

How to do it...

Creating AI function

Configuring access keys

Integrating and testing AI query

Configuring the custom derived metric report

How it works...

See also

Sending application telemetry details via email

Getting ready

How to do it...

How it works...

There's more...

See also

Integrating real-time AI monitoring data with Power BI using Azure Functions

Getting ready

How to do it...

Configuring Power BI with dashboard, dataset, and push URI

Creating Azure AI real-time Power BI - C# function

How it works...

There's more...

Chapter 7: Code Reusability and Refactoring the Code in Azure Functions

Introduction

Creating a common code repository for better manageability within a function app

How to do it...

How it works...

There's more...

See also

Shared code across Azure Functions using class libraries

How to do it...

How it works...

There's more...

See also

Azure Functions and precompiled assemblies

Getting ready...

How to do it...

Creating a class library using Visual Studio

Creating a new HTTP trigger Azure Function

How it works...

There's more...

See also

Migrating legacy C# application classes to Azure Functions using PowerShell

Getting ready

How to do it...

Creating an application using Visual Studio

Creating a new PowerShell Azure Function

How it works...

See also

Using strongly typed classes in Azure Functions

Getting ready

How to do it...

How it works...

There's more...

See also

Chapter 8: Developing Reliable and Durable Serverless Applications Using Durable Functions

Introduction

Configuring Durable Functions in the Azure Management portal

Getting ready

How to do it...

There's more...

See also

Creating a hello world Durable Function app

Getting ready

How to do it...

Creating HttpStart Function - the Orchestrator client

Creating Orchestrator function

Creating Activity function

How it works...

There's more...

See also

Testing and troubleshooting Durable Functions

Getting ready

How to do it...

See also

Implementing multithreaded reliable applications using Durable Functions

Getting ready

How to do it...

Creating Orchestrator function

Creating Activity function GetAllCustomers

Creating Activity function CreateQRCodeImagesPerCustomer

How it works...

There's more...

See also

Chapter 9: Implement Best Practices for Azure Functions

Adding multiple messages to a Queue using the IAsyncCollector function

Getting ready

How to do it...

How it works...

There's more...

Implementing defensive applications using Azure Functions and Queue triggers

Getting ready

How to do it...

CreateQueueMessage - C# Console Application

Developing the Azure Function - Queue trigger

Running tests using the Console Application

How it works...

There's more...

Handling massive ingress using Event Hub for IoT and similar scenarios

Getting ready

How to do it...

Creating an Azure Function Event Hub trigger 

Developing a Console Application that simulates IoT data 

Enabling authorization for function apps

Getting ready

How to do it...

How it works...

There's more...

See also

Controlling access to Azure Functions using function keys

How to do it...

Configuring the function key for each application

Configuring one host key for all the functions in a single function app

There's more...

See also

Chapter 10: Implement Continuous Integration and Deployment of Azure Functions Using Visual Studio Team Services

Introduction

Prerequisites

Continuous integration - creating a build definition

How to do it...

How it works...

There's more...

See also

Continuous integration - queuing the build and trigger manually

Getting ready

How to do it...

See also

Configuring and triggering the automated build

How to do it...

How it works...

There's more...

See also 

Creating a release definition

Getting ready

How to do it...

How it works...

There's more...

See also

Trigger the release automatically

Getting ready

How to do it...

How it works...

There's more...

See also

Index

The users who browse this book also browse