This morning I was hoping to take a few minutes to modify one of the examples in the StreamInsight CTP and send an output stream to a UI, rather than the text files used in the examples. I thought this would be easy, as the readme states that there’s
“An alpha version of the StreamInsight libraries for development using the IObservable/IObserver programming paradigm.”
But it wasn’t. The IObservable used in StreamInsight is defined in a different namespace than the IObservable in the System.Reactive and the StreamInsight api lacks the base classes and extension methods defined in System.Reactive. At this time, the two APIs do not play well with each other.
Some thoughts on how to get around this temporary inconsistency:
- Recompile System.Reactive to use StreamInsight’s IObservable/IObserver
- Create a type converter between the two IObservable/IObservers
- Create a StreamInsight output adapter which just raises a .Net event, then use the RX method of converting events to IObservables