0

I've been used Futures in guava for a long time. I use it to chaining, combining, adding callback for listenable future.

Recently I start to study Lettuce, a java client for redis. And Lettuce provides asynchronous client which implements with CompletionStage, and reactive client which implements with RxJava.

In my opinion, CompletionStage is an implementation of Guava Futures in Java 8. And the characters provided by CompletionStage is all most the same with RxJava. Such as

Futures.transform() vs Observable.map()

Futures.addCallback() vs Observable.subscribe()

So what's the advantages of RxJava compare to Futures/CompletionStage?

Alexis
  • 1,080
  • 3
  • 21
  • 44
  • it's all about the API : I don't think you have delay/switchMap/take/filter equivalient using Guava Futures. – dwursteisen Jan 17 '17 at 12:08
  • See a related answer that I wrote for a similar question: http://stackoverflow.com/questions/39214073/rxjava-instead-of-asynctask-pros-and-cons/39215031#39215031 – Tassos Bassoukos Jan 17 '17 at 13:54

0 Answers0