我开始了解StreamInsight(v2.1!)并开始基于StreamInsight团队的WCF示例开发应用程序。 现在我想为该应用程序添加弹性和监视,但无法弄清楚如何。我试过按照Checkpointing Sample和这些教程,但没有运气: http://msdn.microsoft.com/en-us/library/hh290476(v=sql.111).aspx
http://msdn.microsoft.com/en-us/library/ee391166(v=sql.111).aspx
我应该调整WcfObservable吗?或者我应该如何为我的observable,观察者和查询添加弹性?
这是我的代码的一部分:
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);
提前感谢您的时间!