
Explore the basics of RxJava 3 and reactive programming through two sections: core concepts and practical Java examples on the JVM, including server-side use.
Explore RxJava JavaDocs with marble diagrams to visualize how observables, operators like map, flatMap, zip, and filter transform streams, handle errors, and schedule work on the computation scheduler.
Compare standard Java streams parallel processing with RxJava, showing how flatMap and subscribeOn run per-item work on separate threads and then merge results with blockingSubscribe.
Explore RxJava schedulers that control which threads run your code, using subscribeOn and observeOn, with examples of computation, IO, newThread, trampoline, and a custom executor-based scheduler.
Learn how errors propagate through an RxJava pipeline, triggering onError and skipping downstream steps, and how onErrorResumeNext enables recovery with fallback data.
See how back pressure is handled in RxJava by converting observables to Flowable with toFlowable and applying strategies like buffer, drop, latest, and error to manage unconsumed events.
Learn to test RxJava observables with a test observer, asserting results, no errors, and completion, including multi-threaded scenarios using TestScheduler and interval with zipWith.
Use RxJava's PublishSubject to implement a single event bus that broadcasts type-filtered events to registered observers via onNext, enabling decoupled, asynchronous UI updates and easy disposal.
Implement a backoff strategy for rate-limited APIs using RxJava's retryWhen, with exponential delays and a retry sequence. Explore how range and timer generate delays, and how lastOrError handles exhausted retries.
Functional Reactive Programming (FRP) is a different programming paradigm, just like Object Oriented Programming. It has gotten traction in the recent years where more and more technology adopt it for building responsive, reliable and maintainable systems. Writing multithreading code is usually difficult because you need to think how several pieces move at the same time and work together.
In this course I'll teach you RxJava, the Java implementation of Reactive Extensions to write safe, reliable multithreading code. It's being heavily in use in Android applications, but this course presents RxJava concepts in a generic way. You don't need to know anything about Android to use this course, learn and use RxJava in any kind of Java application.
You will learn how RxJava compares with Java standard library for writing multithreading code, and the parallel streams introduced in Java 8. In the section about use cases, I present you some examples of how RxJava solves particular challenges, so you can get started quickly. This course is meant to serve as a quick reference, the section about use cases doesn't follow a particular order, so you can skip and come back to lectures as you see fit.
The concepts you learn here will also help you understand other libraries that were inspired by Reactive Extensions.
(Music: bensound)