Discover millions of ebooks, audiobooks, and so much more with a free trial

From $11.99/month after trial. Cancel anytime.

Azure Serverless Computing Cookbook
Azure Serverless Computing Cookbook
Azure Serverless Computing Cookbook
Ebook565 pages2 hours

Azure Serverless Computing Cookbook

Rating: 0 out of 5 stars

()

Read preview

About this ebook

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 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.

Style and approach

This recipe-based guide explains the different features of Azure Function by taking a real-world application related to a specific domain. You will learn how to implement automation and DevOps and discover industry best practices to develop applications hosted on serverless architecture using Azure functions.

LanguageEnglish
Release dateAug 17, 2017
ISBN9781788392594
Azure Serverless Computing Cookbook

Related to Azure Serverless Computing Cookbook

Related ebooks

System Administration For You

View More

Related articles

Reviews for Azure Serverless Computing Cookbook

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Azure Serverless Computing Cookbook - Praveen Kumar Sreeram

    Azure Serverless Computing Cookbook

    Azure Serverless Computing Cookbook

    Solve problems at scale by leveraging Azure Functions

    Praveen Kumar Sreeram

    BIRMINGHAM - MUMBAI

    Azure Serverless Computing Cookbook

    Copyright © 2017 Packt Publishing

    All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

    Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

    Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

    First published: August 2017

    Production reference: 1160817

    Published by Packt Publishing Ltd.

    Livery Place

    35 Livery Street

    Birmingham

    B3 2PB, UK.

    ISBN 978-1-78839-082-8

    www.packtpub.com

    Credits

    Foreword

    It is my pleasure to write the foreword for Azure Serverless Computing Cookbook by Praveen Kumar Sreeram. Azure Functions is one of the key Platform as a service (PaaS) components from Microsoft and provides a rich experience for the event-driven, compute-on-demand programming model. To use Azure Functions, the user is not required to be a master of any specific programming language; rather, they can use their language of choice, such as C#, Node.js, JavaScript, PowerShell, and so on, to create highly scalable functions.

    Azure Serverless Computing Cookbook shows the author's dedication and hard work to come out with a gem that will not only benefit developers and architects, but also enterprises that want to leverage serverless solutions in Azure. The author has thoroughly gone through each parameter and every consideration in tackling the concept of Azure Functions. You will surely like the way numerous code samples and use cases blend together to create a knowledge repository for you to start with cloud development on the go.

    I would like to thank Packt, Mohd. Riyan Khan, and Shrilekha Inani for involving me in evaluating the content and giving me the opportunity to write this foreword.

    Abhishek Kumar

    Microsoft Azure MVP and Consultant – Datacom New Zealand

    About the Author

    Praveen Kumar Sreeram works as a Solution Architect at PennyWise Solutions (an Ogilvy and Mather Company). He has over 12 years of experience in the field of development, analysis, design, and delivery of applications of various technologies, including custom web development using ASP.NET and MVC to building mobile apps using the cross-platform technology Xamarin for domains such as insurance, telecom, and wireless expense management. He has been awarded two times as the Most Valuable Professional by one of the most leading social community websites, CSharpCorner, for his contributions toward writing articles and helping community members, mostly on Microsoft Azure. He is highly focused on learning about technology. He is an avid blogger who writes about his learning at his personal blog, called PraveenKumarSreeram and you can also follow him on twitter at @PrawinSreeram. His current focus is on analyzing business problems and providing technical solutions for various projects related to Microsoft Azure and Sitecore.

    First of all, my thanks go to the great editorial team at Packt Publishing for identifying my potential and giving me the opportunity to write this book, especially Shrilekha Inani, Sweeny Dias, Komal Karne, Yogesh Mishra, and the whole team who encouraged me a lot. Without them, I couldn’t have done it.

    I would like to thank my current employer, PennyWise Solutions, all of my management team, especially the CTOs, Mr. Pavan Pochu and Mr. Arup Dutta, for guiding me all the way, and my lovely colleagues who encouraged me a lot.

    I would like to thank my grandma Neelavatamma; dad, Kamalakar; mom, Seetha; my better half, Haritha; and my little princess, Rithwika; for being in my life and giving me courage all the time.

    I would like to express my deepest gratitude to Medeme Narasimhulu and Medeme Saraswathi (my uncle and aunt) who have been supporting me and encouraging me right from my college days. Without them, I wouldn't have even become a software professional.

    About the Reviewer

    Florian Klaffenbach started  his IT career in 2004 as a 1st and 2nd level IT support technician and IT salesman trainee for a B2B online shop. After that, he changed to a small company working as IT project manager for planning, implementing, and integrating from industrial plants and laundries into enterprise IT. After a few years, he changed course to Dell Germany. There, he started from scratch as an enterprise technical support analyst and later worked on a project to start Dell technical communities and support over social media in Europe and outside of the US. Currently, he works as a Technology Solutions Professional for Microsoft, specializing in hybrid Microsoft cloud infrastructured.

    Additionally, he is active as a Microsoft blogger and lecturer. He blogs on his own page, Datacenter-Flo.de, and the Brocade Germany community. Together with a very good friend, he founded Windows Server User Group Berlin to create a network of Microsoft IT Pros in Berlin. Florian maintains a very tight network with many vendors such as Cisco, Dell, and Microsoft and several communities. This helps him grow his experience and get the best out of a solution for his customers. Since 2016, he has also been the Co-Chairman of the Azure community Germany. In April 2016, Microsoft awarded Florian the Microsoft Most Valuable Professional for Cloud and Datacenter Management. In 2017, after joining Microsoft, Florian became an MVP reconnect member.

    Florian has worked for several companies and Microsoft partners such as Dell Germany, CGI Germany, and msg services ag. Now he has joined Microsoft Germany in a technical presales role and supports customers in getting started with hybrid cloud infrastructures and topics.

    He has also worked on the following books:

    Taking Control with System Center App Controller

    Microsoft Azure Storage Essentials

    Mastering Cloud Development using Microsoft Azure

    Mastering Microsoft Deployment Toolkit 2013

    Implementing Azure Design Patterns

    Windows Server 2016 Cookbook

    Mastering Active Directory

    Exchange PowerShell Cookbook

    Implementing Azure Solutions

    Acknowledgments

    I want to thank Packt Publishing for giving me the chance to review the book as well as my employer and my family for being accommodating of the time investment I have made in this project. There is a special thanks I need to make to Virginia Dias from Packt. It is always awesome to be a reviewer on her projects, and it’s a great pleasure to work with her.

    www.PacktPub.com

    For support files and downloads related to your book, please visit www.PacktPub.com. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

    https://www.packtpub.com/mapt

    Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.

    Why subscribe?

    Fully searchable across every book published by Packt

    Copy and paste, print, and bookmark content

    On demand and accessible via a web browser

    Customer Feedback

    Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1788390822.

    If you'd like to join our team of regular reviewers, you can e-mail us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!

    Table of Contents

    Preface

    What this book covers

    What you need for this book

    Who this book is for

    Sections

    Getting ready

    How to do it…

    How it works…

    There's more…

    See also

    Conventions

    Reader feedback

    Customer support

    Downloading the example code

    Downloading the color images of this book

    Errata

    Piracy

    Questions

    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

    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...

    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

    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

    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...

    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...

    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

    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

    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

    Enjoying the preview?
    Page 1 of 1