Dealing with streams using RxJs

Dealing with streams using RxJs


Hugo Cordier

June 05, 2015


  1. 2.

    Hello! I am Hugo Cordier Developer and CTO at Melusyn

    Melusyn helps film makers to manage and organize their productions. You can find me at : @HugoCrd We are hiring! Drop me a line at ♥
  2. 19.

    The Rx Model A stream is an Observable An Observable

    push down events through Operators
  3. 20.

    The Rx Model Operators transform a stream They can be

    used to transform, filter and mix events from an Observable
  4. 30.

    An Observable needs to be subscribed The Rx Model The

    stream will flow once it has been subscribed
  5. 35.
  6. 37.

    In real life Live search Using Google Geocoder and RxJS
  7. 39.

    In real life Realtime statistics Ping a server each x

    seconds and diplay results
  8. 40.
  9. 41.

    In real life with... Node.js Node uses Callbacks. They can

    easily be used as a stream var rename = Rx.Observable.fromNodeCallback(fs.rename); rename('file1.txt', 'file2.txt') .map(...) .subscribe(...)
  10. 42.

    In real life with... Angular.js Angular $watch is a stream

    of model changes Angular also has an eventbus system : events on a handler are a stream Rx.Observable.$watch(scope, 'name') .map(...) .subscribe(...)
  11. 43.

    In real life with... Backbone.js Binding to an object is

    listening to it’s changes. This could be used as a stream. Rx.Observable.fromEvent(object, ‘click’) .map(...) .subscribe(...)
  12. 44.

    In real life with... JS Wokers A worker could post

    messages to into stream Rx.DOM.fromWebWorker('worker.js') .map(...) .subscribe(...)
  13. 45.

    Thanks! Any questions? We are hiring! Drop me a line

    at or @HugoCrd ♥