Essential concepts

Let's take a look at the vocabulary Akka Streams uses to describe streams and their elements.

As described earlier, every stream has producer, consumer, and transformation steps. In Akka Streams they are named Source, Sink, and Flow respectively.

More formally, in Akka Streams any building block of a stream is named a processing stage. A processing stage with a single output is a Source, a single input is a Sink and with one input, and one output is a Flow. By connecting a source and a sink to the flow we build a Runnable Graph which can be executed.

There are also special processing stages:

  • Fan-in with two or more inputs and one output
  • Fan-out with one input and two or more outputs
  • Bidiflow with two inputs and two outputs pointing in opposite directions

We made up the following diagram with all processing stages interconnected to simplify grasping the concept. The dotted lines represent the backpressure we mentioned earlier: 

Figure 1. Different processing stages interconnected in runnable graph
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.190.211