rodoherty1 / AkkaStreams

Collection of tests and apps to demo basic functionality of Akka Streams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AkkaStreams Build Status

Basic Examples in Unit Tests

  • Sources, Folds and Sinks
  • Materialized Values from Sources and Sinks
  • Tickers
  • Simple Websocket Client and Server

Threading in Unit Tests

  • Demonstrate that an Akka Stream is not called on the caller's thread
  • Demomstrate that AkkaStreams will generally reuse a thread when executing successive processing stages
  • Demomstrate that AkkaStreams will occasionally suspend a thread and use a different thread from the threadpool.

Akka-Http

  • Akka-Http was intended to be a primary use case for AkkaStreams
  • Akka-Http provide back pressure all the way back to the TCP layer

Links

Topics that are not covered in this session

  • Supervision strategies
  • Streams insides Streams (e.g. an ActorRef that kicks off its own Stream)
  • Distributed Streams
  • The Graph DSL and combining Partial Graphs

FAQ

Q: Should I use many ActorMaterializers? A: You should not need more than a couple of Materializers and those cases where you either want

  1. to bind the lifecycle of a bunch of streams to an Actor (in which case you create a Materializer with the Actor's context.system so that when the actor dies, all streams under that materializer will be terminated).
  2. if you want to shut down a bunch of streams together by calling materializer.shutdown() which will terminate all streams belonging to that materializer.

Must haves Todos

  • Document the basic terminology (graph stages, processing stage)
  • Tidy up the websock server and client example. Describe the streams on either side and describe how backpressure works.

About

Collection of tests and apps to demo basic functionality of Akka Streams


Languages

Language:Scala 100.0%