什么是Azure的云服务工作者角色的用例? [英] What are the use cases of Azure Cloud Services Worker Roles?

查看:172
本文介绍了什么是Azure的云服务工作者角色的用例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来微软的Azure和我没有真正获得在云服务工作者角色的想法。在Web角色是那种容易掌握:他们是虚拟机的运行IIS的,这样我不用去管理它自己,所以当我部署到Web角色,我将部署到的东西在IIS中运行

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.

现在,工人的角色,每个人都说这就像Windows服务,它运行在后台,我真的不得到的的和的为什么的我需要这个。直到今天,我从来没有需要制定一个窗口服务,所以也许正因为如此,我没有得到与辅助角色的地步。

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.

另外,我似乎人们对辅助角色部署的WebAPI的应用程序,但的WebAPI的东西,我会在IIS上运行,所以它似乎更喜欢比工人的角色Web角色。

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?

推荐答案

由于@Thiago说,有吨用途。

As @Thiago said, there are tons of uses.

想到的YouTube的实例。你会如何​​,现在执行它...你可能会建立一个前端,当用户会看和上传视频。

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.

您绝对不希望在你这样做,你不希望与浏览器中打开用户,而你做到这一点,以阻止该用户。这时候,一个工人的作用开始发挥作用... ...有没有需要UI和它不依赖于从用户任何东西,你只要运行你所需要的过程和存在时通知用户视频已准备就绪。难道他还在那里吗?他出示徽章什么的,他才关闭浏览器?给他发电子邮件。

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

这篇关于什么是Azure的云服务工作者角色的用例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆