ConnectableObservables (part 3)
IntroductionIn the previous post, we saw how to build a ConnectableObservable which publishes events to its child Subscribers when all of them requested some amount, making them go in a lockstep.In...
View ArticleComparison of Reactive-Streams implementations (part 1)
IntroductionThe Reactive-Streams initiative becomes more and more known in concurrency/parallelism circles and there appear to be several implementations of the specification, most notably...
View ArticleAsynchronous Event Streams vs. Reactive-Streams
IntroductionI've recently came across an interesting presentation from EclipseCon titled Asynchronous Event Streams – when java.util.stream met org.osgi.util.promise! (video, specification). It appears...
View ArticleThe new Completable API (part 1)
IntroductionIf you are following the day-to-day RxJava GitHub activity, you might have noticed a PR about a new and mysterious rx.Completable class. This PR has been merged into the 1.x branch (in...
View ArticleThe new Completable API (part 2 - final)
IntroductionIn this final part, I'm going to show how one can implement operators (source and transformative alike). Since the Completable API features no values but only the terminal onError and...
View ArticleFlatMap (part 1)
IntroductionIn this blog post, I begin to explain the outer and inner properties of the most used, misunderstood and at the same time, one of the most complex operator there is: flatMap.FlatMap is most...
View ArticleFlatMap (part 2)
IntroductionIn this post, we will look into expanding the features of our flatMap implementation and improve its performance.RxJava's flatMap implementation offers limiting the maximum concurrency,...
View ArticleRxJava design retrospect
IntoductionRxJava is now out more than 3 years and lived through several significant version changes. In this blog post, I'll point out design and implementation decisions that I personally think...
View ArticleOperator-fusion (Part 1)
IntroductionOperator-fusion, one of the cutting-edge research topics in the reactive programming world, is the aim to have two of more subsequent operators combined in a way that reduces overhead...
View ArticleWriting a custom reactive base type
IntroductionFrom time to time, the question or request comes up that one would really like to have his/her own reactive type. Even though RxJava's Observable has plenty of methods and extension points...
View ArticleSubscribeOn and ObserveOn
IntroductionOne of the most confused operator pair of the reactive ecosystem is the subscribeOn and observeOn operators. The source of confusion may be rooted in a few causes:they sound alike,they...
View ArticleOperator fusion (part 2 - final)
IntroductionIn the previous part, I've introduced the concepts around operator fusion. In this post, I'll detail the API and protocols required make operator fusion happen.In its current form, operator...
View ArticleGoogle Agera vs. ReactiveX
IntroductionIf you are following events around Android development, or just happen to follow all things reactive, there was a "big" announcement from Google: they've released their reactive programming...
View ArticleAsync Iterable/Enumerable vs. Reactive-Streams
IntroductionBackpressure is essential if one wants to avoid buffer bloat and excessive memory usage if two stages in a reactive pipeline consume events with different speed. RxJava and Reactive-Streams...
View ArticleThe Reactive Scrabble benchmarks
IntroductionIn the past year, I've been posting benchmark results under the mysterious Shakespeare Plays (Reactive) Scrabble name. In this blog post, I'll explain what this benchmark is, where does it...
View ArticleJava 9 Flow API: asynchronous integer range source
IntroductionJava 9 is becoming more reactive by introducing the Reactive-Streams interfaces under the parent class java.util.concurrent.Flow, enabling a new standard interoperation between future...
View ArticleJava 9 Flow API: mapping and filtering in one stage
IntroductionIn most reactive libraries, mapping and filtering can be done on a flow via separate operators map() and filter() respectively. One rare occasions, the functions to these operators would...
View ArticleRxJava vs. Kotlin Coroutines, a quick look
IntroductionDoes Kotlin Coroutines make RxJava and reactive programming obsolete? The answer depends on who you ask. Enthusiasts and marketing departments would say yes without hesitation. If so,...
View ArticleJava 9 Flow API: mapping asynchronously
IntroductionThere are cases where mapping an upstream value of type T has to be mapped to type U , one-for-one, but the mapping process itself involves asynchronous work. With RxJava, this is a...
View ArticleRewriting RxJava with Kotlin Coroutines?
IntroductionSomeone influential stated that RxJava should be rewritten with Kotlin Coroutines. I haven't seen any attempt of it as of now and declaring such a thing to be (not) worth without actually...
View Article