4

I am quite new to Azure and not quite sure what service I need to achieve this:

What I want to do is developing an application/service to do some computing tasks. I have created a web API for sending data to my database. I will use the data from my database to perform some computing and store results back in the database. This app/service will be run continuously.

I am not sure if I should use a web job or a cloud service or a virtual machine. They all seem to be able to achieve what I want.. or maybe there are things I should consider?

Many thanks,

LT

user1480478
  • 584
  • 3
  • 15
  • Have you read this Microsoft article comparing Websites, Cloud Services, and Virtual Machines? http://azure.microsoft.com/en-us/documentation/articles/choose-web-site-cloud-service-vm/ – CSharpRocks Mar 03 '15 at 11:30
  • Thanks CSharpRocks, I just looked at it. It looks like web site is the easiest choice. But since my application will not have a front end/web interface, is this option is still OK? because my application should be running all the time, even if no one opens the web site. – user1480478 Mar 03 '15 at 11:53
  • Unfortunately, there is no single right answer to this. You can mix and match all you want, and there are valid reasons for using any of them. If it helps, I published a different StackOverflow [answer](http://stackoverflow.com/questions/10941488/what-is-the-difference-between-an-azure-web-site-and-an-azure-web-role/10941526#10941526) comparing websites and web roles (cloud service), before that article was published (I've been keeping it up to date)... – David Makogon Mar 03 '15 at 12:42
  • Well, technically your Web API is just a Web app returning JSON, not HTML. You can run Webjobs on demand, on a schedule or continuously http://azure.microsoft.com/en-us/documentation/articles/websites-webjobs-resources/ – CSharpRocks Mar 03 '15 at 12:47
  • Oh and keep in mind that both your Web API app and Webjob are sharing the same resources so try to balance the workload accordingly – CSharpRocks Mar 03 '15 at 12:55
  • Thanks, guys. I will try the web job first and see how it goes. – user1480478 Mar 03 '15 at 13:28
  • Possible duplicate of [Azure webjob vs cloud service](http://stackoverflow.com/questions/26800255/azure-webjob-vs-cloud-service) – N8allan Jun 22 '16 at 01:10

1 Answers1

6

A general data processing job like this, should be achievable through both Web Jobs, Cloud Services and VMs. These solutions represents different levels of control in the Azure platform, and it depends on how much control over the process you need.

Web Sites only lets you run code inside IIS (the Web Server), so they are not suitable for running background processes without interruption. Therefore, Web Jobs have been created to help users run background processes for their Web Sites. You will not be able to control advanced things, like memory consumption or user permissions, but in your case this is probably not required. I would try this first.

If Web Jobs is not enough, a Cloud Service with a worker role should give you necessary control over the machine resources, and it can be run with elevated user permissions. The most technical way is to run a VM, but then you also need to control things like patching on your own. This is only useful if you need very specific control over how your programs are installed, and should not be necessary in your case.