What is a stream?

A stream is a sequence of things that is flowing continuously from a source to a destination. Stream elements are processed sequentially. It is also known as a data stream, data streaming, or streaming data.

Here, things can refer to anything, for instance, data elements, components, entities, objects, bytes, elements, files, and so on. Take a look at the following diagram:

In the real world, a stream will form only when at least one source and at least one destination are connected and have data flowing between them. Remember these three terminologies as discussed in this section—source, destination, and flowing. These three ...

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