Get ready with tin foil hats folks - we're going to get a tad geeky in this story about so-called serverless systems. Nope - these are not the fabled vapor clouds of a past failed PR program but a serious effort by Microsoft at moving the proverbial needle on an already gnarly topic.
Cloud services are on an evolutionary path towards higher levels of abstraction. What started as a way to share and resell virtualized infrastructure (IaaS) has grown to include more sophisticated data analysis, machine learning and network services along with application backends and development frameworks (PaaS).
Each of these further distances cloud customers from the infrastructure they're using, however the latest rung on the ladder of logical abstraction, serverless computing, aka functions-as-a-service (FaaS), promises to utterly obscure the connection.
Serverless is an unfortunate moniker since code services like AWS Lambda and Azure or Google Cloud Functions executes still run on server hardware typically within a Docker-like container. However the user needn't worry about the deployment details, server monitoring or resource sizing.
Although it didn't invent the concept, AWS popularized event-driven code functions with Lambda. While AWS still enjoys a lead in usage and mindshare, Microsoft has arguably been pushing serverless technology harder than anyone lately with the introduction of Azure Functions and, more recently, Logic Apps, all supported by its rich portfolio of developer tools. Last week, the company detailed its serverless strategy, products and customer usage at a small workshop that included presentations by key project managers and developers along with hands on coding labs.
Building on PaaS
Azure CTO Mark Russinovich started off the event by sharing Microsoft's vision of the progression of cloud technology from IaaS to serverless, contending that PaaS is a critical element to business digital transformation which leads to the next leg of cloud-driven business innovation.
Hardly controversial since the arc of cloud technology bends upwards towards higher-value services increasingly distant from the implementation details.
As a relatively new and dynamic product category, serverless is subject to both broad interpretation and hype (e.g. product washing), so Russinovich clearly stated Microsoft's definition of the concept up front by identifying several important attributes:
- The complete abstraction of servers from the user
- Event-driven services that are dynamically and instantaneously scalable
- Service that uses a micro-billing pricing model based on resource consumption and executions, not instance sizes.
The obvious benefit to developers by removing the need to worry about infrastructure is the increased time to focus on an application's business logic, along with reduced DevOps process overhead and faster cycle times. However, FaaS doesn't suit every problem, and Microsoft realizes that event-driven modules must integrate with other programming models that require persistent PaaS and IaaS.
Functions are attractive to both developers and business managers paying for cloud services since they only run in response to external triggers such as changes in a storage container, activity on the Azure Service Bus (a message queue) or Event Hub (streaming data collector) or when set off by a scheduled timer.
Thus, users only pay for the time Functions are executing, not for a VM instance that might be idle much of the day. Functions are connected to Azure services through input/output bindings that describe how to handle data, such as taking input from a SQL table and adding a new row as output. Indeed, these data bindings are a powerful feature that set Azure Functions apart from serverless offerings at AWS and Google Cloud.
Regardless the platform, the trick with the current crop of serverless products is knowing when to use them. Nir Mashkowski, Group Program Manager for Azure App Service, says Functions are so far being adopted in three situations:
- By enterprises and large ISVs as an integration and scripting tool for legacy applications
- By start-ups and small ISVs to build backend services
- By IoT users to process data ingested into Azure
As a developer-focused service, Functions are most useful if they are tied into the rest of the application toolchain, which offers Microsoft a decided advantage over competitors due to its expertise in building developer tooling and widely adopted product portfolio. Thus, developers can use familiar IDEs like Visual Studio, Eclipse or IntelliJ and code repositories like GitHub or the quite capable Azure online portal. Indeed, developers can even setup a local runtime environment for code testing without ever using Azure.
Despite Microsoft's ample supply of code templates, use of context-sensitive help and forms-based IDE wizards, Functions remains a tool for serious developers, and that limits its appeal. To broaden the audience and utility of event-driven cloud services, Microsoft created Logic Apps.
Enabling serverless for non-developers
Logic Apps are essentially an Azure version of BizTalk Server providing what Russinovich termed "serverless workload orchestration," namely the intelligent glue between data sources and other cloud applications and services, which intriguingly can include Azure Functions. Like BizTalk, Logic Apps can work with an incredible variety of products, with over 120 connectors to a who's who of cloud services like Box/Dropbox, Facebook, Gmail and G Suite, Salesforce, Slack, and Twilio, Internet protocols like HTTP, FTP, RSS and SMTP, and the entire Azure and Office 365 portfolio.
Logic Apps nicely complement Functions by being designed for the IT generalist. It comes with a graphical workflow designer built into the Azure portal for describing complex processes, has a library of forms-based templates to streamline defining workflow logic and configuration and that allow doing many operations without writing a line of code.
As a Microsoft development tool, Logic Apps integrates with Visual Studio for those needing specialized control logic or wanting to integrate with a CI/CD toolchain.
Enterprise integration services are nothing new, but as a cloud service Logic Apps advances the concept by enabling non-developers to access Azure's collection of sophisticated data analysis, machine learning and cognitive services for things like predictive statistical modeling, image or speech recognition, text sentiment analysis or conversational interfaces.
For example, one of the labs at the workshop demonstrated how to build a Logic App with a chat interface that could respond to text commands and trigger actions such as adding a case to a ticketing system or searching a database for a particular keyword using the Azure Bot Framework.
Serverless functions are still in the early stages of inflated expectations where marketeers and over-exuberant analysts flock to the shiny new object as a solution to every problem.
Eventually, the industry will come to a more nuanced understanding of the relative strengths and limitations of event-driven functions and Microsoft is to be commended for accelerating this process by emphasizing the role of Functions within a larger application architecture.
Russinovich shared several case studies that illustrated the use of Functions and the benefits of a serverless design that eliminates VM deployment, management and monitoring overhead, simplifies data flows and enables integration to business partners and third-party services.
For example, Accuweather routinely replicates and processes logs of API calls from customers, triggering actions based on the data analysis. Its original method used persistent VMs and storage with cron jobs scheduled to move and analyze the data. These have been replaced by Functions that only trigger when needed, saving significantly on infrastructure cost and administrative overhead.
Similarly, Plexure, a location-based CRM product, has replaced a fleet of VMs and containers with Functions that ingest and analyze IoT data and create custom notifications when customers are in proximity to an in-store display or device.
Serverless functions are conceptually similar to backend services that developers have long used to encapsulate frequently-used operations,. However unlike a Linux daemon or BaaS product, products like Azure Functions and Logic Apps provide users with the flexibility of unlimited customization.
FaaS are but one manifestation of a trend towards decomposing applications into granular, microservice modules and will supplement, but not replace application containers and more advanced cloud platform, data and AI services. The organizations that learn how to properly incorporate serverless functions into a cloud-native application architecture, without force-fitting them into every situation will find them a powerful development tool that provides significant business benefits.