如何做Azure的角色间通信? [英] How to do inter-role communication with Azure?

查看:121
本文介绍了如何做Azure的角色间通信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我完全感到困惑,一个人如何得到一个Azure角色(Web角色或辅助角色是否)与其他Azure角色沟通?

I am utterly baffled as to how one gets an Azure role (whether web role or worker role) to communicate with another Azure role?

我看着服务总线继电器,速度是荒谬的 - 它花了大约6小时获得一个角色数据到另一个角色,而调试。当我通过在云中运行的Web服务暴露了完全相同的数据,我可以将数据下载到我的手机在一分钟内。荒谬。我假设数据是正在从我的机器发送到云中,然后从那里回我的机器。

I've looked at Service Bus Relays and the speed is ridiculous - it took about 6 hours to get data from one role into another role while debugging. When I expose that exact same data via a web service that runs in the cloud I can download that data to my phone in under a minute. Ridiculous. I am assuming the data was being sent from my machine to the cloud, and then from there back to my machine.

服务总线继电器有一个称为混合在那里应该打开直接套接字连接,以便快速通信模式,但字面上如何做到这一点的文档。

Service Bus Relays have a mode called Hybrid where it is supposed to open a direct socket connection to allow for fast communication, but there is literally no documentation on how to accomplish this.

我已经在通过WCF NetTcpBinding的一个角色暴露的服务,但我不知道如何使其他角色能够调用它。

I've exposed a service on one role via the WCF NetTcpBinding, but I don't know how to make the other role be able to call it.

我也看了服务总线队列/订阅,但没有对消息的256KB的限制,您可以发送!

I've also looked at Service Bus Queues/Subscriptions but there is a 256KB limit on the messages you can send!

我无法相信缺乏文档和教程了那里什么应该是一个共同的情景 - (!这是驻留在相同的物理计算机上的所有可能性)两个角色之间的快速通信

I cannot believe the lack of documentation and tutorials out there for what should be a common scenario - fast communication between two roles (that are in all likelihood residing on the exact same physical computer!)

任何帮助很多AP preciated,谢谢!

Any help is much appreciated, thank you!

推荐答案

我没有在这里找到任何令人满意的答案,所以作为后续行动,我采取的方法是将数据写入到SQL天青,通过服务总线通知有是更新,并让所有的用户从SQL自己拉更新的数据。它适用于这个特定的场景。

I did not find any satisfactory answers here, so as a follow up the approach I took was to write the data to sql azure, notify via service bus that there is an update, and let all the subscribers pull the updated data from sql themselves. It works for this particular scenario.

尝试通过服务总线发送数据本身是惊人缓慢。使用它,而不是作为一个角色间的事件系统(使用服务总线主题/订阅)效果很好。

Trying to send the data itself via service bus was prohibitively slow. Using it instead as an inter-role eventing system (using service bus topics/subscriptions) works well.

这篇关于如何做Azure的角色间通信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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