Srini
Srini

Reputation: 51

Confused with regards to role of azure-webjobs-sdk-script

I want to write a background process in NodeJs which will process messages from a TOPIC. Reading through an array of confusing articles, there are my options

  1. Write a webjob in NodeJS with a continuous polling mechanism. All plumbing code has to be written by me.
  2. Write a webjob in NodeJS using azure-webjobs-sdk-script (which I think is basically a function wrapped under a webjob) and have the same trigger mechanism as a function and also advantage of webjob dashboard.
  3. Write a function in NodeJS with bindings to TOPIC.

Is my understanding of the Role of azure-webjobs-sdk-script library correct. Is it just a wrapper for functions to run under webjob. What is the differnce between this and running functions under app service plan.

I could not find any clear definition of these options.

Upvotes: 0

Views: 147

Answers (1)

David Ebbo
David Ebbo

Reputation: 43193

azure-webjobs-sdk-script (https://github.com/Azure/azure-webjobs-sdk-script) is what we refer to as the 'Functions Runtime'. In term of deploying it yourself as a WebJob vs using a Function, let's look at some Pros and Cons:

Advantages of using Functions

  • You can use the Consumption plan. That is a huge advantage, especially if your code only needs to run occasionally (basically, it's cheaper!)
  • You can use the Portal experience to develop it.
  • It's simpler to deploy: you only need to deploy your NodeJS function, and don't have to worry about the runtime.
  • The runtime get automatic updates, while in the WebJobs case you're responsible for keeping it up to date.

Advantages of using a WebJob

The main one is that you get more control. e.g. If you want to customize the script runtime, you can deploy your own custom binaries. With Functions, you always use an official runtime

Overall, I would definitely suggest giving Functions a try before you get into the more complex alternative of deploying the script runtime as a WebJob.

Upvotes: 1

Related Questions