More Related Content Similar to rx-java-presentation Similar to rx-java-presentation (20) rx-java-presentation3. REACTIVE SUPPORT IN DIFFERENT LANGUAGES
REACTIVE EXTENSIONS
▸ Rx.Net
▸ RxJava
▸ RxJS
▸ RxScala
▸ RxClojure
▸ RxCpp
▸ Rx.rb
▸ RxPY
▸ RxGroovy
▸ RxJRuby
▸ RxKotlin
▸ RxSwift
5. AN API FOR ASYNCHRONOUS
PROGRAMMING WITH
OBSERVABLE STREAMS.
reactivex.io
DEFINITION
18. WHICH OPERATORS SHOULD I USE?
OPERATORS DECISION TREE
http://reactivex.io/documentation/operators.html#tree
19. NETFLIX OLD WAY - PROBLEM
http://techblog.netflix.com/2012/07/embracing-differences-inside-netflix.html
20. NETFLIX OLD WAY - PROBLEM
http://techblog.netflix.com/2012/07/embracing-differences-inside-netflix.html
21. NETFLIX OLD WAY - PROBLEM
http://techblog.netflix.com/2013/01/optimizing-netflix-api.html
22. NETFLIX NEW WAY - SOLUTION
http://techblog.netflix.com/2013/01/optimizing-netflix-api.html
23. THINK ABOUT THE FUTURE
single item multiple items
sync T getData() Iterable<T> getData()
async Future<T> getData() ?
List<Future<T>> getData()
25. OBSERVABLE TO THE RESCUE
single item multiple items
sync T getData() Iterable<T> getData()
async Future<T> getData()
Observable<T>
getData()
26. NETFLIX NEW WAY - SOLUTION
http://techblog.netflix.com/2012/07/embracing-differences-inside-netflix.html
27. NETFLIX NEW WAY - SOLUTION
http://techblog.netflix.com/2012/07/embracing-differences-inside-netflix.html
29. PARALLEL WORK
CONCURRENCY
▸ most operators - synchronous by default
▸ some operators - implicit concurrency
▸ programmatic concurrency: observeOn/subscribeOn
41. RX NETTY VS TOMCAT
WHY RX NETTY IS BETTER?
▸ lower CPU consumption
▸ lower object allocation rate/less GC
▸ event loop architecture vs thread pool architecture
▸ no thread pool locks
▸ less thread migrations
▸ more CPU Instructions Per Cycle (IPC)
https://github.com/Netflix-Skunkworks/WSPerfLab/blob/master/test-results/RxNetty_vs_Tomcat_April2015.pdf
44. FUTURE IS REACTIVE
JAVA 9 FLOW API
▸ JDK 9.0
▸ RxJava 2.x -> Reactive Streams implementation
▸ JPA -> Hibernate
▸ Reactive Streams -> RxJava 2.x