Summary

First-class event streams are an extremely expressive tool for modelling dynamic, event-based systems with time-varying values. Rx Observable objects are an event stream implementation designed to build scalable, concurrent, event-based applications. In this chapter, we saw how to create Rx Observable objects and how to subscribe to their events. We studied the Observable contract and learned how to compose complex Observable objects from simple ones. We investigated various ways of recovering from failures and saw how to use Rx schedulers to transfer events between threads. Finally, we learned how to design loosely coupled systems with Rx subjects. These powerful tools together allow us to build a plethora of different applications, ranging ...

Get Learning Concurrent Programming in Scala - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.