https://github.com/nurkiewicz/rx-legacy
RxJava in legacy projects - live coding sessions
https://github.com/nurkiewicz/rx-legacy
rxjava
Last synced: 10 months ago
JSON representation
RxJava in legacy projects - live coding sessions
- Host: GitHub
- URL: https://github.com/nurkiewicz/rx-legacy
- Owner: nurkiewicz
- Created: 2016-09-08T22:13:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-20T21:47:58.000Z (over 8 years ago)
- Last Synced: 2025-04-11T11:53:43.883Z (about 1 year ago)
- Topics: rxjava
- Language: Java
- Size: 122 KB
- Stars: 10
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RxJava in legacy projects - live coding session
Rough agenda follows:
## `CompletableFuture`
Similarities
## Introduction to RxJava
## `Observable.fromCallable()`
* wrap business methods, laziness
## `Observable.timeout()`
## `Observable.subscribeOn()`
* custom thread pool
* parallelize `PersonDao` and `WeatherClient` with `zipWith()`
## `Observable.toBlocking()`
## `Observable.merge()`, `first()`
* `CacheServer` x2
## `Observable.interval()`, `distinct()`
* Polling for file system changes
* Potential memory leak, RxJava 2.0, `distinctUntilChanged()`
## `TestScheduler` (test timeouts)
* `timeout()`, `retry()`, `doOnError()`
* `assertNoValues()`, `assertNoErrors()`
## `ReactiveCamel`
CamelContext camel = new DefaultCamelContext();
ReactiveCamel reactiveCamel = new ReactiveCamel(camel);
reactiveCamel
.toObservable("activemq:queue:rx-queue")
.map(Message::getBody)
.toBlocking()
.subscribe(e ->
log.info("Message: {}", e));
## `Observable.flatMap()`
* Parallel fetching of URLs
## `Observable.interval()`, `window()`
* `Pinger`, sliding window of `Status` instances