Azure Serverless Computing Cookbook
上QQ阅读APP看书,第一时间看更新

Introduction

One of the key features required for the smooth running of business applications is to have a reliable communication system between the business and its customers. The communication channel usually operates two-way, by either sending a message to the administrators managing the application or by sending alerts to customers via emails or SMS to their mobile phones.

Azure can integrate with two popular communication services: SendGrid for emails, and Twilio for working with text messages. In this chapter, we will learn how to leverage both of these communication services to send messages between business administrators and end users.

Figure 2.1 is the architecture that we will be using for utilizing SendGrid and Twilio Output Bindings with HTTP and queue triggers:

  1. Client applications (web/mobile) make Http Requests, which trigger the Http Trigger.
  2. The Http Trigger creates a message to the Queue.
  3. A Queue Trigger is invoked as soon as a message arrives at the queue.
  4. Send Grid Output Bindings is executed.
  5. An Email is sent to the end user.
  6. Twilio Output Bindings is executed.
  7. An SMS is sent to the end user:
Figure 2.1: Architecture of SendGrid and Twilio output bindings