Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

Akkurate Akka

Akkurate Akka

The talk was given on local JUG meeting back in 2014. The purpose of the talk was to give an overview of the Akka library for the Java-programmers audience who have never used it before. My first appearance as a public speaker

Avatar for Yuri Ostapchuk

Yuri Ostapchuk

December 10, 2014
Tweet

More Decks by Yuri Ostapchuk

Other Decks in Programming

Transcript

  1. outline Problems to solve Actor Model Java & Scala actors

    Fault-tolerance Scaling, Remoting Reactiveness Some best practices
  2. Modules • akka-kernel • akka-actor • akka-camel • akka-remote •

    akka-cluster • akka-persistence • akka-stream • …
  3. Actor Model Back into the 70’s actors could • perform

    • create another actors • send messages • become Carl Hewitt
  4. Actor • one msg at a time • in one

    thread • msgs in order • small (~2.5M per Gb)
  5. ask

  6. Supervision & Monitoring • failures happen • application should self-heal

    • each actor have supervisor • supervisor handles failures – RESUME – RESTART – STOP – ESCALATE
  7. Actors should do only one thing • Single responsibility principle

    • Create specific supervisors • Keep the error kernel simple
  8. Don’t expose actors • Avoid using this • Don’t close

    over variables • Use immutable messages with immutable data