Reputation: 1024
We've developed a window service that processes Azure queue and add/update/delete database records [Only database related implementation].
Current Implementation [Running fine and there are no issues]:
Created a window service Deployed on Azure VM
And we are trying to find out better alternatives that helps to deploy our business implementation [currently wrapped as Window Service] into Azure Website and/or Azure Cloud Service.
One Possible Alternative:
Create 3 Actions
a. Start [Starts a static timer]
b. Stop [Stops a static timer]
c. Execute [Called through WebRequest on Timer Elapsed]
Deploy that site on Azure website.
1) Have you ever implemented above alternative on Cloud [Azure/Amazon or other]?
2) If yes, would like to know problems faced and their workaround/solutions.
3) Are there better alternatives?
4) Is Window Service best solution in the current scenario?
Upvotes: 3
Views: 1424
Reputation: 379
Azure WebJobs are also an alternative to both Windows Services on a VM and Worker Roles in Cloud Services
https://azure.microsoft.com/en-us/documentation/videos/azure-webjobs-basics/
Upvotes: 0
Reputation: 170549
Well, what does an NT service do? It starts at system startup and runs some kind of infinite loop to "listen" for something or to process some stuff it knows where to fetch from.
Worker roles (and web roles too - those are actually worker roles with IIS) do just the same - Azure infrastructure starts them (and restarts if they fail), then RoleEntryPoint.OnStart()
is invoked for initialization and then RoleEntryPoint.Run()
is invoked and the latter should either sleep forever or run an infinite loop. Basically it's just the same as an NT service, the difference is the NT service is bound to a specific machine and the worker/web role is bound to a "deployment" - a combination of code to execute and settings for that code.
Upvotes: 2
Reputation: 14850
Use worker roles, service bus and cloud services. It's a more robust implementation and in provides APIs for what you are looking for. Check this article
Upvotes: 1