Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RxJava - Getting Started

Brice Dutheil
September 09, 2014

RxJava - Getting Started

Nowadays applications are getting increasingly interconnected. Web Oriented Architecture or Micro-Service Architecture for example show there's a growing trend that integrating multiple different web services at different scale.

How to compose or aggregate all of these interactions in a usable result ; but especially how to implement it in a meaningful and readable code, with loose coupling and without temporal coupling ?

RxJava offers an elegant way to write synchronous and asynchronous code with enhanced composition capabilities. In this lightning talk we will present basic concepts of Rx (Reactive eXtensions).

David Wursteisen - Brice Dutheil / Human Talks Paris / September 9th 2014
Video of this presentation is on parleys in French :
https://www.parleys.com/tutorial/rxjava-getting-started-1

Brice Dutheil

September 09, 2014
Tweet

More Decks by Brice Dutheil

Other Decks in Technology

Transcript

  1. Observable Observable.from(1, 2, 3, 4) Observable.from(asyncTask.getFuture()) Observable.range(1, 4400) Observable.timer(0, 5,

    TimeUnit.SECONDS) Observable.create(...) Observable.from(anIterable) Observable.just(73) Observable.error(new Exception()) Observable.empty() ...
  2. Opérateurs Observable.from(1, 2, 3, 4) .filter((i) -> (i % 2)

    == 0) .subscribe(System.out::println) 2
  3. Opérateurs Observable.from(1, 2, 3, 4) .filter((i) -> (i % 2)

    == 0) .subscribe(System.out::println) 2 4
  4. Opérateurs Observable.from(1, 2, 3, 4) .map((i) -> i * 10)

    .subscribe(System.out::println); 10 20 30 40