18 Data streams and the Reactive Extensions

This chapter covers

  • Using IObservable to represent data streams
  • Creating, transforming, and combining IObservables
  • Knowing when you should use IObservable

If you’ve ever been to a financial hub like Wall Street or Canary Wharf, you’ve probably seen a ticker board, a luminous board displaying the latest price at which the most widely traded stocks are being traded. This is a good representation of a data stream: a stream of related values that are delivered through time.

Traders (both human and algorithms) keep an eye on the prices so that they can react to price changes: if a stock’s price rises or falls to a given level, they may decide to buy or sell, according to their investment strategy. This ...

Get Functional Programming in C#, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.