Stream - (Software|Library)

About

Software, Library around the notion of stream

Distributed stream processing

Distributed stream processing frameworks such as:

IO - built-in streams

These streams are built into the application itself: IO - Standard streams (stdin, stdout, stderr)

Example

Node.js

Node.js stream uses the pipe function to connect the source to the destination

src.pipe(dst)

<wrap box>.pipe(dst)</note> returns <wrap box>dst</note> so that you can chain together multiple <wrap box>.pipe</note> calls together:

a.pipe(b).pipe(c).pipe(d)

which is the same as:

a.pipe(b);
b.pipe(c);
c.pipe(d);

which is the same as with the shell command-line pipe:

a | b | c | d

Java

Java Stream (Map reduce implementation, only one source then)

int sum = widgets.stream()
                      .filter(b -> b.getColor() == RED)
                      .mapToInt(b -> b.getWeight())
                      .sum();

Implementation

Documentation / Reference


Powered by ComboStrap