简体   繁体   English

Azure WorkerRole内部端点

[英]Azure WorkerRole Internal Endpoints

I'm trying to wrap my head around Azure... so far it seems somewhat clunky. 我试图绕过Azure ...到目前为止,似乎有些笨拙。

My perfect setup would be to have a head worker role, a DB worker role, and as many instance worker roles as I need for each "room". 我理想的设置是拥有每个“房间”所需的主要工作人员角色,数据库工作人员角色以及尽可能多的实例工作人员角色。

My initial thought was to use internal endpoints to communicate between all of my instances. 我最初的想法是使用内部端点在我所有实例之间进行通信。 With the Head worker role, able to spawn as many instance worker roles as it needs. 使用Head worker角色,能够根据需要生成尽可能多的instance worker角色。

I found a great msdn article that shows how to setup internal endpoints in the XML...then manually make listeners with a socket to listen for traffic on said port, but I never saw ANY code on actually SENDING data to that instant endpoint. 我找到了一篇很棒的msdn文章,该文章显示了如何在XML中设置内部端点...然后用套接字手动使侦听器侦听所述端口上的流量,但是我从未见过任何将数据实际发送到该即时端点的代码。

Another major red flag here, is that it tells me Instance Endpoints do NOT work locally in the emulator, that you MUST push to production... 这里的另一个主要危险信号是,它告诉我实例端点在仿真器中本地不起作用,您必须将其推送到生产环境。

Before I scrap Azure and look at other options (like VM's) can anybody explain how to send data to a worker role, and can endpoints be setup inside the emulator without pushing to the cloud every time? 在我废弃Azure并查看其他选项(例如VM的选项)之前,谁能解释如何将数据发送到辅助角色,并且可以在模拟器内部设置端点而不必每次都推送到云上吗?

Thanks! 谢谢!

Look at using Service Bus ( http://azure.microsoft.com/en-us/services/service-bus/ ) as your communication platform and have your head Worker Role subscribe for messages. 看一下使用服务总线( http://azure.microsoft.com/en-us/services/service-bus/ )作为您的通信平台,并让您的首席工作者角色订阅消息。 This simplifies your need for a private network and also to understand who the publishers and subscribers are because the only component that needs to know this is the Bus. 这简化了您对专用网络的需求,并简化了发布者和订阅者的身份,因为唯一需要了解这一点的组件就是总线。

If you wish to push large amounts of data around you can't do this via Service Bus - it can be used as a simple messaging platform only. 如果您希望发送大量数据,则无法通过Service Bus进行操作-它只能用作简单的消息传递平台。 In this scenario you would write the large blob to Azure Blob storage, place a message on the queue (most likely containing some meta data about the blob) and then your head Worker Role would read that message and trigger processing. 在这种情况下,您会将大Blob写入Azure Blob存储,在队列上放置一条消息(很可能包含有关Blob的一些元数据),然后您的Head Worker角色将读取该消息并触发处理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM