I'm new to Microsoft Azure and I'm not really getting the idea of Worker Roles in the Cloud Services. The Web Roles are kind of easy to grasp: they are vm's running IIS so that I don't have to manage it myself, so when I deploy to a web role I would be deploying something to run in IIS.
Now, worker roles everyone says "it's like windows services, it runs on background" and I'm not really getting when and why I would need this. Until today I never needed to develop a windows service, so perhaps because of this I'm not getting the point with worker roles.
Also, I've seem people deploying WebAPI apps on worker roles, but WebAPI is something that I would run on IIS, so it seems much more like web role than worker role.
Anyway, what are the real use cases of azure worker roles? When should we use it and why? What are common examples of it's usage?
As @Thiago said, there are tons of uses.
Think of YouTube for instance. How would you implement it right now... You'd probably set up a front-end when users would watch and upload videos.
Once the video is uploaded you need to perform some task on it. Convert it to a specific format, look for copyright material, take snapshots... or whatever it is.
You definitely don't want to block the user while you do that, and you don't want to have the user with the browser open while you do that . That's when a worker role comes into play... there's no need for UI and it does not depend on anything from the user, you just run the processes you need there and notify the user when the video is ready. Is he still there? show him a badge or something, did he close the browser? send him an email.
This is just an example that helped my understand worker roles... hope it helps you too
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments