Ignorar navegação

Serverless computing recipes for your cloud applications

Postado em 19 março, 2018

Director, Product Marketing, Azure

You have heard the hype around serverless computing, read countless online articles about its benefits, and heard industry pundits find new adjectives to describe its pathbreaking nature on a frequent basis. Are you now ready to dig into what you can actually do with real code using serverless computing cloud services like Azure Functions? If so, you should download and read the free Azure Serverless Computing Cookbook that describes with rich code examples, how to solve common problems using serverless Azure Functions.

However, if you need a little more motivation, read on.

Let us get the basics out of the way first. Serverless computing enables:

  • Full abstraction of servers: Focusing on your application code, not on servers running the code.
  • Instant event-driven scalability: Not worrying about scaling up infrastructure as traffic grows.
  • Pay-per-use: Paying only for the time your code is running and the resources it consumes

However, as a developer there is so much more to it that you should care about.

Your cloud journey can start small

You don’t really have to bet your entire application portfolio on this new way of building software all at once. The good thing about the Functions-as-a-Service (FaaS) model provided by Azure Functions is that it allows you to perform a small set of operations, either as extensions to your existing apps or as net new scenarios that you want to try out. Build an automated database cleanup utility, a social media monitoring service, or a file archiving tool that you have been wanting and see if serverless is the right model for you. If one approach doesn’t work for you, write-off the few cents you have spent during this experimentation and start over. It really makes the cloud a lot more approachable.

Fewer servers is good, but less code is even better

Once your code is in the cloud, chances are it will interact with many other cloud services like Database, Storage, Messaging, IoT etc. Having to learn all those cloud services and their APIs, SDKs etc. can be daunting. Azure Functions provides innovative features like Triggers and Bindings that make it very easy for your code to consume all the different Azure services, thereby simplifying your code to contain only business logic rather than the plumbing required to talk to those services. Additionally, the FaaS model naturally leads you in the direction of building small independent micro services, which means better code reuse.

The swiss army knife of cloud applications

You have done your experimentation and seen the economic and productivity benefits of serverless. You are now ready to enter the big game and are probably wondering what kind of problems you can solve with serverless architectures. Building application back ends such as web, mobile, or IoT with variable traffic, real-time data processing pipelines with need for custom processing, automation of IT and operational tasks, and integrating with other services or SaaS applications, are all good examples of where serverless architecture is a good fit. In all these scenarios, Azure Functions provides special benefits through purpose-built integrations with other services required for these scenarios.

Debug your CLOUD application on a DESKTOP computer

Ever heard developers complain about productivity impedance when they move to the cloud. How to debug? How best to deploy? How to monitor? And so on. This is not the case with Azure. Whether through world class tools like Visual Studio, Visual Studio Code or through a command line experience you can get the same edit, build, test, and debug benefits for your serverless applications that you use for your traditional applications. You get all this while running on your local development machine. And if developing entirely through the browser-based portal experience is your thing, Azure Functions provides that too.

Step up to next level

Once you have a serverless application running in the cloud, how do you go about setting up standard practices for Continuous Integration, Continuous Deployment and Application Monitoring? Azure Functions provides first class support for Visual Studio Team Services and GitHub as well as built-in integration with Azure Application Insights to ensure you have a good handle on the operations and performance of your application. When you are ready to go deeper and want to build advanced cloud scenarios requiring state management and complex orchestration, you can use the Durable Functions feature which provides a code-friendly mechanism for doing those things while hiding the complexities.

If you now feel a little more energized about the possibilities of serverless computing, feel free to download and read the free Azure Serverless Computing Cookbook to see how to do all of the above things yourself.