Send the output from output adapters to a line chart...

Answered Send the output from output adapters to a line chart...

  • Monday, June 25, 2012 8:01 AM
     
     

    I have created a sample CEP application (console app) using contosso database, which will return cumulative aggregate averages of each product categories on to the console. But I want to send the output from adapters to a chart which shows the changing of the average sales of product cartegory live.

    Please suggest the ways to do it.

All Replies

  • Monday, June 25, 2012 11:43 AM
     
     

    There are 2 ways that you can do this.

    First, you could host the StreamInsight engine directly in the WinForms/WPF application that has the chart. Your adapter can then push values directly to the chart. It'll be similar to the Toll Booth example in the Sql Server 2008 R2 Developer Training Kit.

    But ... that's not really practical for real-world applications.

    The other thing that you could do ... and this would be for a real application ... is to have some sort of push mechanism that sends the data down to the client. For example, WCF Duplex services work very well for this. You would have a WCF Duplex output adapter and a WCF client on the target application. This can be done in WinForms, WPF and Silverlight. An alternative to WCF would be doing raw IP sockets ... which you could also use to do UDP Multicast.

    It's not easy. But it can be done.


    DevBiker (aka J Sawyer)
    Microsoft MVP - Sql Server (StreamInsight)


    Ruminations of J.net


    If I answered your question, please mark as answer.
    If my post was helpful, please mark as helpful.

  • Monday, June 25, 2012 11:50 AM
     
     

    Hi DevBiker,

    Thanks for your reply.

    I am not able to add StreamInsight dlls to silverlight application. How to resolve this error? Is there any example where we could push the data to charts from output adapters? I am new to this StreamInsight area so please suggest some links where I could find samples regarding my issue.

  • Monday, June 25, 2012 12:03 PM
     
     Answered

    Silverlight will only work with option 2. You don't put the StreamInsight DLLs in the Silverlight project. You create an output adapter that pushes (WCF Duplex, IP Sockets) and then you subscribe to the in Silverlight. All you need is the proxy/deserialization code.

    I don't know of any publicly available samples of this.


    DevBiker (aka J Sawyer)
    Microsoft MVP - Sql Server (StreamInsight)


    Ruminations of J.net


    If I answered your question, please mark as answer.
    If my post was helpful, please mark as helpful.