I Swapped RxJava for Coroutines. Why You Should Too
summary
A practical report describing replacing RxJava with Kotlin coroutines: it shows using plain suspend functions, structured Jobs/Contexts, and Retrofit with a suspend adapter plus a small wrapper for background/context helpers and cancellation. It compares performance with a 200-network-call test, finding blocking coroutines about three times slower but suspend-based coroutines matching or outperforming RxJava when Retrofit uses a suspend-friendly adapter; notes coroutine library was beta and testing suspend functions required reflection workarounds.
AI-written summary · about
chapters (6)
- 0:00Start
- 11:53Base Interactor
- 17:05RxJava Map
- 27:45Coroutines FlatMap
- 34:02Performance
- 36:07Suspend functions
related talks
26mCoroutines and Rx: A Battle Towards Asynchronicity
29mTrip into the async world
42mKotlin Coroutines: An Intro to Practical Use on Android
32mNetworking the Kotlin way: Retrofit + Coroutines
39mNo Need for a Violinist: Ditching RxJava in Favor of Kotlin Coroutines
38mCoroutines by Example
20mLean Async Code with Kotlin's Coroutines
42mKotlin Coroutines: Beyond async/await
