5. Build powerful concurrent &
distributed applications
more easily.
Akka is a toolkit and runtime
for building highly concurrent,
distributed, and resilient
message-driven applications
on the JVM
6. ”The actor model in computer science is a
mathematical model of concurrent computation
that treats actors as the universal primitives of
concurrent computation. ”
Wikipedia
The Actor Model
7. An Actor
and acts on them by:
• Sending messages
• Changing its state
• Changing its behavior
• Creating more actors
receives messages
13. Dos and don’ts
Don’t: Put every actor under /user
Separate parts using supervisors so they can fail independently
Do: Isolate blocking
Put blocking logic on its own thread based dispatcher
Don’t: Write all your logic inside your actors
Make what is possible ”regular” OO logic that you can set up and unit
test synchronously
Do: Make all messages immutable
Or else there will be concurrency/visibility problems
Do: Put asynchronous boundaries where it makes sense
Three tier where each tier is an actor is probably not that useful
14. What more is there?
Akka Cluster
Akka Streams
and cluster tools
async & back-pressured
15. Get started
Learn more - the docs:
http://akka.io/docs
Get help:
gitter channel:
https://gitter.im/akka/akka
mailing list:
https://groups.google.com/forum/#!forum/akka-user
Project with samples:
https://github.com/johanandren/akka-actor-java8-webinar