코딩소림사 Rx java
-
Upload
byeongsu-kang -
Category
Software
-
view
117 -
download
5
Transcript of 코딩소림사 Rx java
코딩 소림사rxJava #2
rxJava2rxJava2 가 나왔어요 .. 1 은 망했어…
rxJava2• 변경점
• rxJava Wiki : https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0
• 번역 : http://realignist.me/code/2017/01/25/rxjava2-changelog.html
• 내부 구조 : reactive-streams 기반으로 변경
reactive-streams ?• Asynchronous stream processing / non-blocking back
pressure 표준• Netflix / Pivotal / Typesafe 개발자들이 주축• 쟁쟁한 reference
• Akka, MongoDB, Ratpack, Reactive Rabbit, Spring5, rxJava …
• http://www.reactive-streams.org/announce-1.0.0
Reactive Manifesto• 한국어 선언문 : http://www.reactivemanifesto.org/ko• 다음 4 가지 특성을 가져야 reactive system 이다 .
• 응답성 (responsive)• 탄력성 (resilient)• 유연성 (elastic)• 메세지 구동 (message driven)
• reactive-streams 는 Reactive manifesto 철학에 기반
rxJava 를 요약하면• Observable : 비동기 방식으로 전달되는 데이터 추상화• Schedulers : 미리 만들어진 thread preset• Observable operators : 생성 / 조작 / 구독
rxJava 를 요약하면• 결국은 publish /
subscribe• Hollywood principle 이다• reactive manifesto 를 쉽게 달성하기 위한 수단
rxJava 를 요약하면• Observable 을 create / transform 하는 여러가지 방법이 있고• thread 를 생성하는 방식에 따라 publish / subscribe 하고• Schedulers 라는 thread pool preset 이 thread 를 관리하고
Flowable vs Observable
• Backpressure buffer 여부• Example 코드 참조
subscribeOn vs observableOn
• Publisher vs Subscriber• Example 코드 참조
Chaining map vs flatMap
• Example code 참조