Formerly known as Wikibon
Search
Close this search box.

Adopting Serverless Computing for Cloud-Native Applications

 

Premise

Serverless computing environments enable simplified, accelerated development of efficient, scalable microservices. For developers, one key advantage of serverless computing is that it frees them from having to build and maintain the logic that manages containers, virtual machines, and the other runtime engines in which their code executes. Public serverless cloud offerings from Amazon, Microsoft, Google, and IBM deliver a cloud-computing fabric that is fully managed, automatically scaled, continuously monitored, and highly available.

Analysis

Digital business requires a robust cloud computing fabric to can execute a wide array of lightweight microservices while dynamically scaling resources up and down.

Serverless computing is a key new paradigm for addressing these cloud computing requirements. A serverless environment execute microservices that are stateless, event-driven, and asynchronous. Typically, these microservices are function-specific, short-running, free of internal and external dependencies, and developed through functional programming.

For developers who are expanding their focus on functional programming in cloud-native environments, Wikibon recommends that they:

  • Assess requirements for running functional microservices in serverless computing fabrics: Enterprise IT professionals should consider expanding the footprint of serverless platforms in their cloud-native computing strategy. As lightweight microservices, functionally programmed applications are well-suited for deployment into serverless cloud environments.
  • Explore commercial serverless cloud-computing offerings. Developers should begin to explore the growing range of serverless public-cloud offerings on the market for running their functionally programmed microservices. The chief offerings–from AWS, Google, IBM, and Microsoft—differ in development, runtime, and administration features, as well in pricing.

Explore Commercial Serverless Cloud Computing Offerings

When deployed to serverless clouds, functionally programmed code spares developers from needing to write the logic that manages containers, virtual machines, and other back-end runtime engines to which execution of microservices will be dynamically allocated. Serverless computing also reduces most dependencies on underlying infrastructure, providing the foundation for the concept of “functions as a service.”

Functionally programmed applications are well-suited for deployment into serverless cloud environments. The primary reason for this is that serverless environments are designed to scale the short-running execution of any code that is function-specific, event-driven, short-running, and stateless, as well as free of internal and external dependencies.

The chief features of serverless environments are that they:

  • Spare developers from the need for visibility into the underlying execution environment;
  • Provide polyglot development platforms, supporting functional programming in such languages as Node.js, C#, PHP, and Python;
  • Build atop platform as a service, providing an abstraction layer over containers, virtual machines, application frameworks, and external dependencies;
  • Deliver a fully managed, auto-scaled, continuously monitored, and high-availability cloud computing platform with dynamic code binding;
  • Achieve higher density and efficiency of cloud CPU, memory, storage, and other resource usage;
  • Offer automatic cloud scaling, capacity management, and infrastructure monitoring and optimization; and
  • Allow DevOps teams to share the same cloud platform for building, chaining, and delivering functionality;
  • Let users pay for processing cycles consumed only for the time their code is running, rather than for idle VM, container, and bare-metal capacity.

Explore Commercial Serverless Cloud Computing Offerings

Currently, the principal serverless public-cloud offerings on the market are from AWS, Google, IBM, and Microsoft. Table 1 provides a quick comparative summary, followed by separate drill-downs in each service.

DEVELOPMENT RUNTIME ADMINISTRATION PRICING
AWS Lambda Use Node.js and other languages to write Lambda functions that connect to Amazon API Gateway Runs automatically in response to AWS services Zero-administration Fine-grained, units measured in hundreds of milliseconds
Google Cloud Functions (in beta) Write in JavaScript to create Cloud Functions and access modules in Node Package Manager registry Cloud Functions run in isolated secure execution contexts in responses to a variety of event types Managed entirely by Google Fine-grained, units measured in hundreds of milliseconds
IBM Bluemix OpenWhisk Highly flexible. Almost anything packaged in a Docker container can deployed Leverages Apache OpenWhisk Managed through an OpenWhisk dashboard Charged by OpenWhisk services
Microsoft Azure Functions Deep integration with MSFT’s expansive array of developer tools and services Runs in both Azure Cloud Azure and on-premise via Azure Stack Administered through Azure services Fine-grained, per msec, after 100msec minimum

 

Table 1: Summary of Different Serverless Computing Environments

AWS Lambda

In November 2014, AWS launched Lambda as the cloud computing industry’s first serverless offering. Currently, AWS Lambda offers the following features:

  • Development: AWS Lambda allows developers to build and run code written as Lambda functions written in js, including functions written in Python, Java, C# and any other language that can be invoked indirectly by Node.js. Developers create Lambda functions, specify the functions’ execution environment, grant them permission to access specific AWS resources, connect them to those AWS resources, and upload the functional code to the service. Developers can access the service from the AWS Management console, from AWS SDKs, and the AWS command-line interface. Lambda APIs connect to Amazon API Gateway and to existing code editors and other tools.
  • Runtime: Lambda automatically runs the code in response to events on AWS’ various services, such as modifications to objects uploaded to Amazon Simple Storage Servicebuckets, messages arriving in Amazon Kinesis streams, and table updates in Amazon DynamoDB. AWS plans to add support in Lambda for more AWS services and other languages.
  • Administration: Lambda provides a zero-administration compute platform, which frees developers from having to manage EC2 instances. When a resource changes, Lambda will execute whatever functions are associated with it and also manage any compute resources needed to keep up with incoming requests. Lambda will shut down computing resources if they are no longer needed by running functions.
  • Pricing: AWS offers fine-grained pricing on Lambda, with users paying for compute time in units of hundreds of milliseconds. There is also a free tier also, which includes 1 million free requests per month and as many as 3.2 million seconds of compute time per month.

Google Cloud Functions

In February 2016, Google announced a preview of its serverless offering: Google Cloud Functions. Currently, the service, still in beta, provides the following features:

  • Development: Google Cloud Functions currently only supports writing of functions in JavaScript and execution in a managed jsruntime environment on Google Cloud Platform. It includes a connective layer of logic for writing code to connect and extend Google cloud services. Functions can be event-driven, invoked via Webhooks, or invoked directly over HTTP/S.  Mobile app developers can use Cloud Functions directly from within Firebase, which is Google Cloud’s mobile platform. Cloud Functions apps can use the thousands of modules in the Node Package Manager registry, with Cloud Functions automatically downloading any needed dependencies on demand.
  • Runtime: Cloud Functions enables event-driven functional logic to be executed in response to events originating from anywhere. It executes each Cloud Function in its own isolated secure execution context, scales automatically, and has a lifecycle independent from other functions. It can listen and respond to events such as a file upload to Cloud Storage, an incoming message on a Cloud Pub/Subtopic, a log change inStackdriver Logging, or a mobile-related event from Firebase.
  • Administration: Google manages all infrastructure, operating systems, and runtime environments completely on the user’s behalf.
  • Pricing: Google bills developers only for cloud computing cycle usage to the nearest 100 milliseconds, and only while their function code is running.

IBM Bluemix OpenWhisk

In February 2016, IBM launched Bluemix OpenWhisk. The service, which is generally available, currently offers the following features:

  • Development: Developers can create OpenWhisk functions in Node.js, Python, Java, and Swift, It supports other languages and runtimes via Dockercontainers. Programmers can flexibly re-use legacy and custom code in OpenWhisk functions, when packaged in Docker containers. Coders can connect functions into flexible and scalable language-independent sequences, using business rules to bind events, triggers, and actions to each other. They can quickly create and modify function action sequences to meet evolving application demands. OpenWhisk integrates via APIs with IBM Watson’s cognitive computing services and IBM’s other Bluemix public cloud services. OpenWhisk provides an open ecosystem in which any developer can contribute their functional action code as building blocks to the expanding repository available to all developers. OpenWhisk actions are available directly through API calls via IBM’s mobile SDK and through the design surfaces of various Watson and Bluemix services.
  • Runtime: OpenWhisk leverages the open-source Apache OpenWhisk code for serverless computing. It runs event-driven, stateless functions on demand in Docker containers. When an event or an API call invokes an action, Bluemix OpenWhisk creates a container to run the action in a runtime appropriate to the programming language used.
  • Administration: Performance and health monitoring of OpenWhisk function actions is via a dashboard graphical summary of OpenWhisk actions.
  • Pricing: Users pay for actual usage of OpenWhisk services rather than for pre-allocated capacity.

Microsoft Azure Functions

In March 2016, Microsoft announced a preview of Azure Functions. The service, which went into general availability that November, currently has the following features:

  • Development: Microsoft Azure Functions allows developers to write functional code and with a single click run for immediate execution. It enables creation, execution, and debugging of Functions locally on Windows via the Azure Functions CLI, in the web-based Functions editor, and, for JavaScript Functions on NodeJS, integration with Visual Studio Code. Functions can be written in any of several languages, including JavaScript, C#, F#, as well as scripting options such as Python, PHP, Bash, Batch, and PowerShell. Developers can add bindings to Azure services and external services—such as Box, Dropbox, Microsoft OneDrive, and SendGrid–or get input into or output from Functions. Developers can also upload and trigger pre-compiled code built with their preferred development tools.  Azure Functions can also power a single-page app, mobile app, or conversational bot using the WebHook URL. Developers can rapidly iterate on Azure Functions with continuous deployment using Visual Studio Team Services, GitHub, or Bitbucket.
  • Runtime: Azure Functions supports the development of on-demand scalable and event-driven solutions in a serverless architecture. It runs both in the Azure Cloud Azure and on-premises via Azure Stack. It offers out of the box Azure and third-party service bindings and continuous deployment to improve developer productivity. Functions bindings can be set for services to trigger a function and the object is passed into the function at runtime. Functions includes support for Azure services such as Blob Storage, Event Hub, Service Bus, Storage Tables and external services like OneDrive and DropBox. It also include a binding extensibility framework that allows developers to create their own service bindings and allow ISVs to contribute to the extension ecosystem. Results can be delivered directly to on-premises databases or business solutions.
  • Administration: Functions is a fully managed service, which spares users from having to administer, patch, or maintain frameworks, the operating system, or cloud infrastructure. An embedded logging environment enables monitoring and troubleshooting of executing Functions.
  • Pricing: Users only pay for only the cloud resource cycles that their Functions consume. Users can set a maximum daily spending cap to prevent runaway functions. Pricing includes a permanent free grant of 400,000 gigabyte seconds execution time and one million total executions each month.  For usage exceeding the monthly free grant, customers are billed based on gigabyte seconds and executions consumed. Azure Functions charges execution per msec, with a 100 msec minimum. For existing Azure App Service Basic/Standard/Premium customers, Functions consumption is incorporated into the cost of the plan. Azure Functions is currently available in 12 Azure Regions.

Action Item

Developers should explore the possibility of running functionally programmed microservices in serverless public clouds. Bear in mind, however, that commercial serverless offerings from AWS, Microsoft, IBM, and Google are commercially immature, with all of them having been introduced to market within the past 3 years.

Book A Briefing

Fill out the form , and our team will be in touch shortly.
Skip to content