Skip to Content
Akka in Action
book

Akka in Action

by Rob Williams, Raymond Roestenburg, Robertus Bakker
September 2016
Beginner content levelBeginner
448 pages
14h 23m
English
Manning Publications
Content preview from Akka in Action

Chapter 11. Finite-state machines and agents

In this chapter

  • Implementing finite-state machines
  • Using timers within finite-state machines
  • Sharing state with agents

Previous chapters have advanced many reasons for using stateless components when implementing a system to avoid all kinds of problems, like restoring state after an error. But in most cases, there are components within a system that need state to be able to provide the required functionality. You’ve already seen two possible ways to keep state in an actor. The first is to use class variables, which we showed in our aggregator example (section 8.4.2). This is the simplest way. The second solution is to use the become/unbecome functionality, which we used in our state-dependent ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Akka in Action video edition

Akka in Action video edition

Raymond Roestenburg, Rob Bakker, Rob Williams
sbt in Action

sbt in Action

Josh Suereth, Matthew Farwell
Effective Akka

Effective Akka

Jamie Allen
Applied Akka Patterns

Applied Akka Patterns

Michael Nash, Wade Waldron

Publisher Resources

ISBN: 9781617291012Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link