Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 961 Bytes

README.md

File metadata and controls

44 lines (32 loc) · 961 Bytes

First principles

Source = "publisher"

  • emits elements asynchronously
  • may or may not terminate

Sink = "subscriber"

  • receives elements
  • terminates only when the publisher terminates

Flow = "processor"

  • transforms elements

Build streams by connecting components

Directory

  • upstream = to the source
  • downstream = to the sink

Running a graph = materializing all components

  • each component produces a materialized value
  • graph produces a singled materialized value

Stream components are fused

  • run on the same actor

Async boundaries

  • components run on different actors
  • better throughput
  • (when operations are expensive)

Data flows through streams in response to demand Streams can slow down fast producers

fan-out components

  • single input, multiple outputs
  • broadcast, balance

fan-in components

  • multiple inputs, single output
  • zip, zipWith, merge, concat

Fault tolerance

  • Recovering, Backoff supervision or Supervision strategies