Chapter 3Building Concurrent Programs

Concurrency is the art of doing several things at the same time, correctly and efficiently. To accomplish this, we structure our programs to take advantage of time so that tasks run together in the most efficient way. Examples of everyday concurrency in applications include keeping the user interface responsive while other activities are happening, and processing hundreds of customers’ orders efficiently.

In this chapter we’ll explore concurrency and pure functions in RxJS by making a shoot-’em-up spaceship game for the browser. We’ll first introduce the Observable pipeline, a technique to chain Observable operators and pass state between them. Then I’ll show you how to use the pipeline to build programs ...

Get Reactive Programming with RxJS 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.