Display earthquakes with Akka-http
-
Upload
pierangelo-cecchetto -
Category
Technology
-
view
200 -
download
3
Transcript of Display earthquakes with Akka-http
Akka-streams & Akka-http
Pierangelo Cecchetto
Java/Scala developer @
@pierangelocecc
https://github.com/pierangeloc
Akka
Akka 101
● Toolkit to build concurrent apps
● “ “ “ distributed “
● Actors can be created/disposed at will
● Small memory footprint
● Hierarchical failure / supervision management
supervises
Akka
● Actors’ mailbox can be unbounded or bounded but dropping
● Actors interaction: can be complex
● Message passing === messages flow
● Messages are handled in an untyped fashion*
* This is being addressed with Typed Actors
Akka
Akka-Streams:
- Sequence of ephemeral elements
- Possibly unbounded
- Can be transformed/mapped
- Immutable, reusable, shareable
- Use bounded buffers
- Compose to build complex streams
- Explicit materialization of a blueprint
Akka-streams
Flow Transformations
⇒
⇒
⇒
⇒
Flow Composition
- Graph builder
- Fan in
- , ,
- Fan out
- ,
Akka-streams
Akka-http
- Streams: back-pressure & buffers
- TCP: back-pressure & buffers
- Streams everywhere:
Think in Streams!