O'Reilly logo

Learning Concurrent Programming in Scala by Aleksandar Prokopec

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Composing Observable objects

Having seen different ways of creating various types of Observable objects, subscribing to their events, and using the Subscription objects, we turn to composing Observable objects into larger programs. From what we have seen so far, the advantages of using Observable objects over a callback-based API are hardly worth the trouble.

The true power of Rx becomes apparent when we start composing Observable objects using various combinators. We can think of an Observable object in a similar way as we think of Scala sequence collections. In a Scala sequence, represented with the Seq[T] trait, elements of type T are ordered in the memory according to their indices. In an Observable[T] trait, events of type T are ordered in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required