Reactive Extensions(Rx)

Rx = Observables + LINQ + Schedulers.

Agenda

  • What is Rx?
  • How to use Rx?
  • Demo time!
  • Where to go next?

What is Rx?

"Using Rx, developers represent asynchronous data streams with Observables,  

 

+

+

=

query asynchronous data streams using LINQ operators

and parameterize the concurrency in the asynchronous data streams using Schedulers." 

- Rx README.md

IEnumerable<T>

pull

foreach

IObservable<T>

push

Subscribe(IObserver)

What is Rx?

T Current, bool MoveNext()

throws Exception

returns

OnNext(T)

OnError(Exception)

OnCompleted

How to use Rx?

How to use Rx?

  • Unified Programming Model
  • Bridge into the Rx world:

Observable.FromEventPattern

Observable.FromAsync

Observer.Create

Observable.Create

  • Subject<T> is Observer and Observable (ReplaySubject, AsyncSubject, BehaviorSubject)

Demo time!

Where to go next?

Questions?

Thanks!

Reactive Extensions (Rx)

By Kjell Otto

Reactive Extensions (Rx)

This is my small talk about ReactiveExtensions (Rx) and how to use them effectively in Event Driven environments.

  • 3,432