开发者

What's an easy way to get output from StreamInsight onto an ASP.NET webpage?

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开发者_JAVA技巧.

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?


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:

  1. Implement an output adapter that hosts some variety of server system. e.g. IIS Hostable Web Core, Socket Server etc.
  2. Implement an output adapter that calls an external stateful service. e.g. write a IIS application with a static variable to store your data, a webservice to update the state of that variable, and a webpage to read that variable.
  3. Some other way of exchanging state - like that filesystem you already rejected.

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.


Now you can use SignalR to publish messages in hubs that any client can subscribe to.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜