
Explore reactive programming with RxJava 2, detailing observables and observers, operators, and flowables, and demonstrate how to compose and test concurrent streams for scalable applications.
Explore reactive programming with RxJava 2, a declarative, event-driven approach that uses observables to push data, enabling scalable, fault-tolerant, and more responsive Java applications.
Explore the observable interface as the core of Java reactive programming, delivering string emissions via on next, signaling uncomplete on finish, and propagating on error to the observer.
Register observables with the create and just factory, emit values via an emitter, and signal on next, on complete, and on error while delegating error handling to the observer.
Link an RxJava observer to an observable and print each emission to the console, handling on next, on complete, and on error. Implement observer methods and subscribe to see emissions.
Explore cold vs hot observables and how a cold observable emits to each observer, while a hot observable shares emissions across all observers, using from iterable to create observables.
Convert a cold observable to a hot connectable observable with publish, then call connect so observers share the same emissions, and subscribe them to the connectable rather than the source.
Learn RxJava 2 interval and range factories: interval emits 0,1,2... at a fixed period on a separate thread; range emits a sequence starting from a value with a set count.
Explore the empty and never factories in RxJava 2, and how they behave. Convert futures to observables with fromFuture, and vice versa.
Examine error handling in RxJava using the Arab factory to throw an error, specify an exception, subscribe, and handle onError with next and complete in testing scenarios.
Learn how the defer factory postpones observable creation until subscription, creating a new observable per subscriber to reflect state changes. This can lead to multiple observable instances with infinite streams.
Explore the single observable in RxJava 2, where a single observer handles subscribe and on success, and the first operator converts first emission into a single observable with a default.
Explore the maybe observable in RxJava 2, which delivers either one value or nothing with on success, on error, on complete, and how filter can produce an empty maybe observable.
Master RxJava composite disposable to manage multiple subscriptions efficiently by disposing all at once. Learn how to add each subscription to a composite disposable and call dispose.
Explore the filter operator by applying a predicate to emit only strings longer than four, returning an observable of strings like Alpha and Omega, and subscribe to observe results.
Explore RxJava 2 take and skip operators to control emissions from observables, including taking the first two items, skipping initial values, and using the first operator with a default value.
Learn takeWhile and skipWhile in rxjava 2, contrasting with filter: takeWhile emits while the predicate holds and stops at the first false; skipWhile skips true items and emits the rest.
Transform emissions with the map operator to produce new observables like seconds elapsed and string lengths by applying functional transformations to the interval observable and string values.
Explore cast and start with, in RxJava 2. Cast converts strings to objects for emissions, while start with prefixes emissions with a value or observable source and supports overloads.
Explore how the default if empty operator emits a default value when an observable is empty. See how switch if empty switches to another observable when the one is empty.
use the delay operator to pause emissions from observables for a time unit such as seconds, delaying their emissions until the wait passes or until a specified inner observable completes.
Use the repeat operator to emit elements multiple times, for example twice. Use scan as a rolling aggregator that updates a running total with total and next.
Use the reduce operator in RxJava 2 to fold observable emissions into a single string, checking for empty values and concatenating with a comma when values are present.
Explore how toList, toSortedList, and toMap collect and organize RxJava 2 streams, using default and custom comparators and key selectors, and learn how duplicates are handled with multi map.
Explore the collect operator in RxJava 2 to build collections using an initial value supplier and add function. Learn how map and collect differ and try hash maps and sets.
Demonstrates RxJava 2 error operators by using on error return item to emit a default value after a division error and on error resume next to continue with alternate observable.
Explore the retry operator in RxJava 2, configuring how many times to retry emissions before an error and why omitting arguments can cause infinite retries.
Explore action operators that perform actions before the next emission, before completion, and before an error occurs, including do next, do on error, do on complete, and do on success.
Leverage flatMap to transform each emission into multiple observables of correctors, using fromArray to create an observable from the array, applying the split function, then subscribe to print each corrector.
Discover how to use concat and concatWith to ensure emission order in RxJava 2, and understand that concat guarantees order while merge does not.
Explore the amb operator to pick the fastest observable among multiple sources, shown with a 1-second and a 300-millisecond interval. See zip pair emissions and discard extras, preview combine latest.
Explore RxJava 2's combine latest and latestFrom operators to pair emissions from two intervals, avoid overflow with infinite streams, and understand how latest values are matched versus zip.
Group emissions by their first character with the groupBy operator, yielding grouped observables by charAt(0); convert each group to a list with toList and flatMapSingle, then print key and items.
Use auto connect with a known number of observers to enable simultaneous multicast with publish, without creating a connectable observable; if the observer count is unknown, use a connectable observable.
Explore sharing in RxJava 2 by using auto connect and ref count to control live emissions for multiple observers, including behaviors when observers join or dispose.
Explore blocking subscription in RxJava 2, using blocking subscribe to block the main thread until on complete, without sleep, and learn why it’s risky in production.
Explore RxJava schedulers and how to assign observers to specific threads. Learn about computation, I/O, new thread, and single schedulers, and apply subscribe on to choose the scheduler.
Apply computation scheduler to run observables on separate threads, compare timings, and learn multi-threading benefits for concurrent tasks in RxJava 2.
Learn how to switch from computation to IO schedulers in RxJava 2 by using observeOn and subscribeOn, and wire a custom ExecutorService with Schedulers.from for your observables.
Discover how flatMap turns each emission into an observable, paired with a scheduler, to parallelize emissions in RxJava 2; a practical workaround for controlling concurrency.
Understand back pressure and when to use floor walls over observables to manage data emitted faster than the observer can handle, with asynchronous operations and blocking io.
Learn to use flowables in RxJava 2: subscribe with a subscription, manage requests, apply subscribeOn schedulers to slow emissions, and observe onNext with backpressure keeping pace.
Explore how to implement back pressure in the create factory by selecting a back pressure strategy - buffer, drop, error, latest, or missing - to control emissions.
Explore back pressure options for observables, including floorboards, and learn how buffer, switchin, throttling, and windowing can manage emissions with fixed size, boundary, and time-based overloads.
Explore how the buffer operator collects emissions into lists, using fixed-size and time-based overloads, and observe how interval emissions are buffered before delivery to the observer.
Use the window operator to group emissions into packets of ten, returning an observable of observables; apply flatMap to count items in each packet.
Explore how switch map disposes of prior emissions by switching to a new inner observable, demonstrated with interval, map, and do on dispose in RxJava 2.
Explore throttling in RxJava by combining three interval sources with concat, then emit only the last or first value each second using throttle last and throttle first, plus timeout-based throttling.
Explore how observable transformers let you compose your own operators with the built-in RxJava operators using compose, reducing redundant code.
Learn to implement a generic observable transformer in RxJava 2 that maps strings to numbers, composes operators, and preserves state changes with the defer operator.
Explore testing RxJava 2 streams using blocking operators and tests. Use test observers as a compact alternative and test schedulers to simulate time, then debug reactive lists.
Master the blocking subscribe approach in RxJava 2 to run sequential assertions on an interval stream that fires every 300 ms for 10 values, ensuring tests complete correctly.
Explore blocking operators for testing in RxJava 2, including blocking first, blocking last, blocking get, and blocking for each, with filtering and assertions; a segue to test observers.
Master RxJava 2 reactive programming by using test observers and test subscribers as a ready-to-use alternative to blocking operators, asserting subscriptions, terminal events, completion, errors, and emitted values.
Use test observer and test schedulers to simulate time, advance time by or to specific moments, and assert emission counts and values in RxJava tests.
Debug RxJava code by instrumenting the chain with do on success. Split a dash-delimited string with regex, filter alphabetic names with matches, and verify emissions.
Reactive Paradigm is used widely in multiple projects around the world with a variety of programming languages. Reactive Approach use a higher level of abstraction than traditional approaches, where developers focus much more on what they need to do instead of how to do it, this approach is called the declarative programming. It uses also an event-driven approach where the application updates itself in response to external and internal events in a form of notifications to controllers. We use it much more on the MVC Pattern as the view is getting all the data it needs from controller in a reactive way, that’s why RxJava works perfectly with pattern designs.
In this course, we will be using RxJava 2.0, which is the latest version. It includes all the features of Java 8 Lambda expressions and also Modularity and Streams of Java 9 & 10.
The course is subdivided as following:
Observable and Observers: working and manipulating data streams in a much more seamless way
RxJava Operators: we will use lambda expressions in operators to transform, reduce, suppress and even perform all sorts of actions on data streams
Combinations and multicasting: combining techniques like zipping and merging to put all different observables into one observable
Flowables: a great alternative when dealing with huge data sets and with higher velocity
Concurrency operators: to make rxjava applications multithreaded
Transformers: to compose our own operators and be able to create new ones if needed
Testing and debugging: with rxjava testing operators
With this comprehensive curriculum student will have a solid knowledge in rxjava
So let’s rock it guys !