Reputation: 477
In rxJava2 there's a distinction between Observables (not backpressured) and Flowables (backpressured). https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#when-to-use-observable gives some reasons to use observables, but as far as I can see, the functionality of observables is a subset from those of flowables.
Is there any reason not to always use flowables instead? Are observables faster perhaps? Or can you do things with observables that you cannot do with flowables?
Upvotes: 7
Views: 457
Reputation: 21486
Using Observable has lower overhead in general than Flowable
The main issue with backpressure is that many hot sources, such as UI events, can't be reasonably backpressured
Although there are other frameworks, eg. Project Reactor, that do not make such distinction and implement only objects with backpressure.
Upvotes: 6