A unidirectional data pipeline moves data in one direction from a source to a destination. In JavaScript, streams and promises support this architecture; an Observable models a lazy, push-based source that waits for a subscriber before transmitting data. section 1.0 section 9.4.1
An Observable pipeline separates data production, transformation, observation, and cleanup:
- The Observable provides the conduit through which data flows downstream from its source. section 9.4.1
- Operators can alter the flow’s course, speed, or other characteristics as data travels toward its destination. section 9.4.1
- The Observer receives events through next, error, and complete operations. section 9.4.1
- The Subscription exposes unsubscribe so consumers can stop generation-specific work, such as clearing an interval. section 9.4.1
Listing 9.14 Creating and subscribing to an Observable
const obs$ = Observable.of('The', 'Joy', 'of', 'JavaScript');
const subs = obs$.subscribe({
next: ::console.log #1
});
subs.unsubscribe();
Create an Observable from several values, subscribe a consumer to receive each value, then unsubscribe from the resulting stream. section 9.4.1

