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?