locked
App communication with StreamInsight Server RRS feed

  • Question

  • I have started building a StreamInsight 2.1 application to communicate with multiple clients.

    These clients need to send some data(a class object) to the StreamInsight server for processing purpose.

    I've tried to create an embedded SI server and expose it to http://localhost:8090/StreamInsight/MyApp

    var mySource = myApp.DefineObservable(() => Observable.Interval(TimeSpan.FromSeconds(1))).ToPointStreamable(x => PointEvent.CreateInsert(DateTimeOffset.Now, x), AdvanceTimeSettings.StrictlyIncreasingStartTime);  
      
    mySource.Deploy("serverSource");  
      
    var myQuery = from e in mySource  
                  where e % 2 == 0  
                  select e;  
    
    var mySink = myApp.DefineObserver(() => Observer.Create<long>(x => Console.WriteLine("sink_Server..: {0}", x)));  
      
    mySink.Deploy("serverSink");  
      

    I can see the service is up through Event Debugger.

    So as for the client side i can get the serverSource through

    var mySource = myApp.GetObservable<int>("serverSource");  

    But how can i inject the data into this serverSource?  or do i need to bind it event sink?


    Thursday, December 8, 2016 3:46 PM

All replies

  • Just found out the sample WCF, all the project can be executed successfully.

    Client can receive the data by subscribe to SI. But the problem is i can't monitor it with event debugger due to the following code.

    _selfHost.AddServiceEndpoint( typeof(IWCFObservable), //type(IManagementService) new WSHttpBinding(), "WcfObservableService");

    ServiceMetadataBehavior smb = new ServiceMetadataBehavior(); smb.HttpGetEnabled = true; _selfHost.Description.Behaviors.Add(smb);

    _selfHost.Open();

    I can monitor if i change IWCFObservable to IManagementService, but client no longer receive the data.

    Any way to combine these 2 interfaces to make all functions available?

    Friday, December 9, 2016 9:00 AM