Serverless: Event-driven Cloud Functions

We have taken reference of Azure Functions for explaining Serverless Event driven cloud functions. Other popular serverless functions include ASW Lambda, Google Cloud Functions, & IBM Cloud Functions. Most of them share quite similar architecture and working pattern.

Introduction

Azure Functions is a serverless solution that allows you to write less code, maintain less infrastructure, and save on costs. Instead of worrying about deploying and maintaining servers, the cloud infrastructure provides all the up-to-date resources needed to keep your applications running. You focus on the code that matters most to you, in the most productive language for you, and Azure Functions handles the rest.

We often build systems to react to a series of critical events. Whether you’re building a web API, responding to database changes, processing IoT data streams, or even managing message queues – every application needs a way to run some code as these events occur.

To meet this need, Azure Functions provides “compute on-demand” in two significant ways.

  • First, Azure Functions allows you to implement your system’s logic into readily available blocks of code. These code blocks are called “functions”. Different functions can run anytime you need to respond to critical events.
  • Second, as requests increase, Azure Functions meets the demand with as many resources and function instances as necessary – but only while needed. As requests fall, any extra resources and application instances drop off automatically.

Scenarios

In many cases, a function integrates with an array of cloud services to provide feature-rich implementations.

The following are a common, but by no means exhaustive, set of scenarios for Azure Functions.

If you want to…then…
Build a web APIImplement an endpoint for your web applications using the HTTP trigger
Process file uploadsRun code when a file is uploaded or changed in blob storage
Build a serverless workflowCreate an event-driven workflow from a series of functions using durable functions
Respond to database changesRun custom logic when a document is created or updated in Azure Cosmos DB
Run scheduled tasksExecute code on pre-defined timed intervals
Create reliable message queue systemsProcess message queues using Queue StorageService Bus, or Event Hubs
Analyze IoT data streamsCollect and process data from IoT devices
Process data in real timeUse Functions and SignalR to respond to data in the moment

These scenarios allow you to build event-driven systems using modern architectural patterns.

As you build your functions, you have the following options and resources available:

Reference Materials

Leave a Reply

Your email address will not be published. Required fields are marked *