简体   繁体   English

双工消息传递或Azure队列服务

[英]Duplex messaging or Azure Queue Service

All , 全部,

We have a requirement to develop a azure based platform, in which the user can configure multiple pharmaceutical instruments, start measurements on them and analyze the measured data. 我们需要开发一个基于天蓝色的平台,在该平台上,用户可以配置多个制药仪器,对其进行测量并分析测量数据。 The typical components in the azure based platform will be following 基于Azure的平台中的典型组件如下

1 - A .NET based 4 client application running on the computer connected to each instrument. 1-在连接到每台仪器的计算机上运行的基于.NET的4客户端应用程序。 This client application should receive the start measurement command from the azure platform , perform the measurement and update the result back to the azure* 此客户端应用程序应从azure平台接收开始测量命令,执行测量并将结果更新回azure *

2 - A set of services[probably REST based] which will get the results from the client application and update the database on the cloud 2-一组服务(可能基于REST),将从客户端应用程序获取结果并更新云上的数据库

3 - A set of services and business logic which which can be used to perform analysis on the data 3-一组服务和业务逻辑,可用于对数据进行分析

4 - A asp.net web application where the user can view instrument details , start measurement etc 4-一个asp.net Web应用程序,用户可以在其中查看仪器详细信息,开始测量等

There is a two way communication between the Azure platform and the client application ie the client needs to update results to the azure and the azure needs to initiate measurement on the instrument via the client application Azure平台和客户端应用程序之间存在两种通信方式,即客户端需要将结果更新到天蓝色天蓝色需要通过客户端应用程序在仪器上启动测量

In such a scenario , what is the recommended approach for the azure platform to communicate to the clients. 在这种情况下,建议Azure平台与客户端进行通信的方法是什么。 Is it any of the following 请问以下任何一个

1 - Create a duplex service between the client and server and provide a call back interface to start the measurement 1-在客户端和服务器之间创建双工服务,并提供回叫界面以开始测量

2 - Create a command queue using Azure message queue for each client. 2-使用Azure消息队列为每个客户端创建命令队列。 when a measurement needs to be started , a message will the put on the queue. 当需要开始测量时,将在队列中显示一条消息。 The client app will always read from the queue and execute the command 客户端应用将始终从队列中读取并执行命令

or do we have any other ways to do this , any help is appreciated 还是我们有其他方法可以做到,我们将不胜感激

We do not fully understand your scenario and constraints around it, but as pointers, we have seen lot of customers use Azure storage queues to implement master-worker scenario (some component adds message to appropriate queue to get work done (take measurements in your case) and workers polling the queue to process this work (client computer connected to your instrument in this case)). 我们并没有完全了解您的方案及其周围的约束,但是作为指针,我们已经看到很多客户使用Azure存储队列来实现主员工方案(某些组件将消息添加到适当的队列中以完成工作(在您的情况下进行评估) )和工作人员轮询队列以处理此工作(在这种情况下,客户端计算机已连接到您的仪器)。

In terms of storing the results back, your master component could provide SAS access to client to write results back to specific blob in an Azure storage account and either have your service and business logic monitor existence of that blob to start your analysis. 就将结果存储回来而言,您的主组件可以向客户端提供SAS访问权限,以将结果写回到Azure存储帐户中的特定Blob,并且可以让您的服务和业务逻辑监视该Blob的存在以开始分析。

Above approach will decouple your client from server and make communication asynchronous via storage. 上面的方法将使客户端与服务器脱钩,并通过存储使通信异步。 Again, these are just pointers and you would be the best person to pick the right approach that suits your requirement 同样,这些只是指针,您将是最适合选择适合您需求的方法的人

对于服务器和客户端之间的通信,可以使用SignalR http://signalr.net/,Azure上支持两种形式的消息传递系统“即服务”,它们是Service Bus和Message Queues-请参阅此链接http: //msdn.microsoft.com/zh-CN/library/hh767287.aspx

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

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