StreamInsight Wcf Sample with resiliency

302 Views Asked by At

I'm getting to know StreamInsight (v2.1!) and started working on an application based on the WCF Sample from the StreamInsight Team. Now I would like to add resilience and monitoring to that application but can't figure out how. I've tried following the Checkpointing Sample and these tutorials but with no luck: http://msdn.microsoft.com/en-us/library/hh290476(v=sql.111).aspx

http://msdn.microsoft.com/en-us/library/ee391166(v=sql.111).aspx

Should I adapt the WcfObservable? Or how should I add resilience to my observable, observer and query?

This is part of my code:

var wcfIn = app.DefineObservable(() => new WcfObservable(wcfSourceURL));
var wcfStream = wcfIn.ToPointStreamable(i => PointEvent.CreateInsert<Measurement>(i.T, i.M),
                                             AdvanceTimeSettings.IncreasingStartTime);

//Check measurements for deflections
var deflectionQuery = from r in wcfStream
                      where r.Value > measurableValue * 1 + threshhold || r.Value < measurableValue * 0 + threshhold
                      select new OutputEvent
                      {
                           M = r,
                           Deflection = (r.Value - measurableValue) / measurableValue,
                           Error = "Deflection"
                      };
var sqlObserver = app.DefineObserver(() => Observer.Create<OutputEvent>(SqlWritePoint));
proc = deflectionQuery.Bind(sqlObserver).RunCheckpointable(procName);

Thanks in advance for your time!

0

There are 0 best solutions below