将 StreamInsight 的输出获取到 ASP.NET 网页的简单方法是什么?
我有一个 Twitter 数据流,正在由 Microsoft StreamInsight 进行解析和聚合。输出是一个数字(百分比)。理想情况下,在(向 Web 服务器)发出请求时,我希望从 StreamInsight 检索最新的百分比并在响应中使用它。
我知道我可以将 StreamInsight 输出适配器写入文件,然后读取该文件,但由于多种原因,这是错误的。我希望 ASP.NET 应用程序能够以某种方式实际连接到 StreamInsight 来轮询百分比。
有什么想法吗?
I have a stream of Twitter data that's being parsed and aggregated by Microsoft StreamInsight. The output is a single number (a percentage). Ideally, at the time of the request (to the web server), I'd like to retrieve the latest percentage from StreamInsight and use it in the response.
I know I could have a StreamInsight output adapter write to file, and then read the file, but that's just wrong for so many reasons. I'm hoping that an ASP.NET application can actually connect to StreamInsight in some way to poll for the percentage.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
StreamInsight 只是工具包/框架,数据的形状或多或少是未知的 - 因此寻找 ASP.NET 直接连接到 StreamInsight 的方法将是徒劳的。
您的选择是:
我已经完成了 #3 一次,也不喜欢它,遇到了锁定问题等。完成了 #2 几次 - 最终在输出适配器中实现了自定义 Web 服务和客户端,以线程安全的方式将数据写入内存,保留滚动列表等和 OData 解决方案来读取相同的数据,这样我就可以附加
PivotViewer。
StreamInsight is just toolkit/framework, and the shape of your data is more or less unknown - so searching for a way for ASP.NET to directly connect to StreamInsight directly will be fruitless.
Your options are instead:
I've done #3 once, also didn't like it, had locking problems etc. Done #2 a couple of times - ended up with custom webservice and client implemented in an Output Adapter to write data in a threadsafe fashion into memory, keep a rolling list etc. and an OData solution to read the same data, so I could attach
PivotViewer.
现在,您可以使用 SignalR 在任何客户端都可以订阅的集线器中发布消息。
Now you can use SignalR to publish messages in hubs that any client can subscribe to.