0

When processing events in real time, without a doubt I'd say that the right approach is to use Rx and IObservable.

But what if you had to re-process those same events after they've been captured and persisted?

Now they have an additional timestamp field and you can "replay" them by converting an IEnumerable< TEvent > into an IObservable< TEvent >. You have queries to run that rely on configuring windows and buffers and this works easily in realtime using TimeSpan.FromSeconds() but becomes kind of clunky with IObservable when the events have Timestamps (see this very related question: How to window/buffer IObservable<T> into chunks based on a Func<T> ) Do you abandon IObservable and use IEnumerable?

Finally, how does one approach the challenge of an event stream that starts in the past and is replayed up to the present with Timestamps and continues into the future?

Community
  • 1
  • 1
sevzas
  • 701
  • 2
  • 5
  • 13
  • 3
    A popular set of rx questions with many answers - here's a selection: http://stackoverflow.com/questions/20969829/advanceable-historical-stream-and-live-stream-in-rx/20975724?s=5|0.1360#20975724 http://stackoverflow.com/questions/22255205/observable-from-list-of-timetamps?lq=1 http://stackoverflow.com/questions/14813963/merging-historical-and-live-stock-price-data-with-rx/16199129?s=2|3.3847#16199129 These three answers should get you underway. – James World Nov 03 '14 at 15:39
  • Kudos to James World, Lee Campbell and Dave Sexton for all of the great Rx knowledge! – sevzas Nov 03 '14 at 20:04

0 Answers0