Using Amazon Lambda or Google Cloud Function check out Azure Functions


Azure Functions are the answer to Amazon’s Lambda or Google’s Cloud Functions, which perform similar roles, though Azure already had something similar, called WebJobs, and Azure Functions use the WebJobs SDK. “Azure functions are an evolution of WebJob.

So what are Azure WebJobs

The following article goes into great detail on Web Jobs such as On Demand WebJobs aka. Scheduled WebJobs aka. Triggered WebJobs see https://azure.microsoft.com/en-us/documentation/articles/web-sites-create-web-jobs/ 

But here is a quick summary of WebJobs and Azure Fuctions for the purpose of this blog

Triggered WebJobs

Are WebJobs which are run once when a URL is called or when the schedule property is present in schedule.job. Scheduled WebJobs are just WebJobs which have had an Azure Scheduler Job created to call our URL on a schedule, but we also support the schedule property, as mentioned previously.

Positives

+ Executable/Script on demand

+ Scheduled executions

Negatives

- Have to trigger via .scm endpoint

- Scaling is manual

- VM is always required

Continuous WebJobs (non SDK)

These jobs run forever and we will wake them up when they crash. You need to enable Always On for these to work, which means running them in Basic tier and above.

Postitives

+ Executable/Script always running

Negatives

- Requires always on – Basic tier and above

- VM is always required

Continuous WebJobs with the WebJobs SDK

These aren’t anything from a “WebJobs the feature” point of view. Essentially, we have this sweet SDK we wrote targeting WebJobs which lets you execute code based on simple triggers. I’ll talk about this more later on.

Positives

+ Executable/Script always running

+ Richer logging/dashboard

+ Triggers supported along with long running tasks

Negatives

- Requires always on – Basic tier and above

- Scaling is manual to set up

- Getting started can be a bit tiresome

- VM is always required

So what is Azure WebJobs SDK

Azure WebJobs SDK is a completely separate SDK from WebJobs the platform feature. It’s designed to be run in a WebJob, but can really be run anywhere. We have customers who run them on worker roles and even on premise or other clouds, though support is only best effort.

The SDK is just about making it easy to run some code in reaction to some event and make binding to services/etc. easy. This is honestly best covered in some docs, but the heart of it is that “event” + “code” nature. We’ve also done some cool extensibility work, but that’s secondary to the core purpose.

Summary

Positive

+ You can extend and run whatever you want. Full control.

Negative

- HTTP support is lacking

So what is an Azure Functions

Azure Functions is an event driven, compute-on-demand experience that extends the existing Azure application platform with capabilities to implement code triggered by events occurring in virtually any Azure or 3rd party service as well as on-premises systems.

image

Azure Functions allows developers to take action by connecting to data sources or messaging solutions, thus making it easy to process and react to events.

Azure Functions scale based on demand and you pay only for the resources you consume.

Azure Functions is all about taking that core purpose of the WebJobs SDK, hosting it as a service, and making it easy to get started with other languages. We also introduce the “Serverless” concept here because it made a lot of sense to do so – we know how our SDK scales, so we can do intelligent things for you.

Azure Functions is a very heavily managed experience. We aren’t supporting bringing your own host. Currently, we don’t support custom extensions but its something the team are investigating. 

Positives 

+ Lots of languages supported

+ Fully managed, dynamic scaling

+ Easy to use portal w/ UX for managing connections/etc.

Negatives

- Host not customizable (yet)

Differentiators

~ Runs in a separate “app” which requires some configuration in your repo, but makes long term maintenance much easier.

~  Some tooling is now in alpha – https://www.npmjs.com/package/azurefunctions

Getting Started with Azure Functions

To get started with Azure Functions, you can visit functions.azure.com and click on the green Get Started button. If you need a trial Azure subscription, there is also a link on that page.

Learn more about Azure Functions form my colleagues Martin Kearns and Martin Beeby via WebHack Wednesday. During this session Martin does a quick demo of using Azure Functions


Documentation

Visit azure.com Azure Functions documentation page.

Questions & Help

If you have questions about Azure Functions, we encourage you to reach out to the community and Azure Functions dev team for help.

  • For all questions and technical help, our MSDN forums are an easy place to have a conversation with our engineering team.
  • For questions which fit the Stack Overflow format (“how does this work?”), we monitor the azure-functions tag.
  • You can also tweet/follow @AzureFunctions.

Helpful links

Get started

Questions & Feedback

GitHub repositories

Documentation

Samples

Comments (0)