
"If you've ever built a pipeline that reads from a socket, parses lines, batches them, transforms each batch, and writes to a database - and then watched it OOM because the source was faster than the sink - you've felt the absence of back-pressure. Akka Streams is built on top of actors but presents a different API: a typed graph of Source, Flow, and Sink stages with back-pressure enforced end to end. Slow consumers slow down fast producers automatically."
"Under the hood, every stage runs in an actor; the demand signal ("I can take N more items") flows upstream as messages, and elements flow downstream. The TCP analogy is exact, because the standard says so: this is Reactive Streams ( org.reactivestreams.* interfaces), an industry-standard back-pressure protocol."
"Stream graphs are also where you build serious data pipelines - Kafka consumers via Alpakka, HTTP clients via Akka HTTP, file readers, websocket bridges. If your problem is "shape data and move it," reach for Streams before raw actors."
"Akka Cluster makes a group of ActorSystems on different machines act like one system. There's no central coordinator. There's no master node. Members talk via an epidemic gossip protocol: each node periodically picks one or two peers and exchanges its view of the cluster (who's a member, who's reachable, version vectors). After a few rounds of gossip, everyone converges on the same view."
A pipeline that reads, parses, batches, transforms, and writes can run out of memory when the source outpaces the sink. Akka Streams provides a typed graph of Source, Flow, and Sink stages with back-pressure enforced end to end. Each stage runs as an actor, and demand signals flow upstream as messages while elements flow downstream. This demand-driven mechanism limits in-flight work, preventing fast producers from overwhelming slow consumers. The approach aligns with the Reactive Streams protocol. Stream graphs support building data pipelines such as Kafka consumers, HTTP clients, file readers, and websocket bridges. Akka Cluster then connects multiple ActorSystems across machines into one logical system without a central coordinator, using epidemic gossip to converge on shared membership views.
Read at Medium
Unable to calculate read time
Collection
[
|
...
]