liveBook · Manning

What you will learn in Akka in Action, Second Edition

by Rob Williams,Raymond Roestenburg,Francisco Lopez-Sancho,Robertus Bakker

Chapter by chapter

Chapter 1: Introducing Akka

1.1 What is Akka? · 1.2 Actors: A quick overview · 1.3 Two approaches to scaling: Setting up the example · 1.4 Traditional scaling · 1.4.1 Traditional scaling and durability: Moving everything to the database · 1.4.2 Traditional scaling and interactive use: Polling · 1.4.3 Traditional scaling: Transactions · 1.5 Scaling with Akka · 1.5.1 Scaling with Akka and durability: Sending and receiving messages · 1.5.2 Scaling with Akka and interactive use: Pushing messages · 1.5.3 Scaling with Akka and failure: Asynchronous decoupling · 1.5.4 The Akka approach: Sending and receiving messages · 1.6 Actors: One programming model to rule up and out · 1.6.1 An asynchronous model · 1.6.2 Actor operations · 1.7 Akka actors · 1.7.1 ActorSystem · 1.7.2 ActorRef, mailboxes, and actors · 1.7.3 Dispatchers · 1.7.4 Actors and the network · 1.8 Summary

What you learn in chapter 1 →

Chapter 2: Up and running

2.1 Printing money · 2.2 Starting to code · 2.2.1 The protocol of the actor · 2.2.2 Creating an application and instantiating the actor · 2.2.3 Sending messages · 2.2.4 Implementing the actor: Receiving messages · 2.2.5 Terminating the system · 2.2.6 The application · 2.2.7 The solution in Git · 2.2.8 Running the app · 2.3 Keeping state with a variable · 2.4 Keeping state with behaviors · 2.5 Scheduling a message · 2.6 Summary

What you learn in chapter 2 →

Chapter 3: One actor is no actor

3.1 Simple parser example · 3.1.1 Coding the app · 3.1.2 Coding the guardian and spawning · 3.1.3 Sending messages back and forth: Adapting responses · 3.1.4 The protocol with the adapter’s message · 3.1.5 The adapter’s function · 3.1.6 Delegating · 3.1.7 A protocol with commands and responses as traits · 3.1.8 Coding the worker · 3.2 Asking and expecting a reply · 3.2.1 A simple question · 3.2.2 Coding the manager · 3.2.3 The protocols · 3.2.4 Asking · 3.2.5 Coding the worker · 3.2.6 Using context · 3.2.7 Ask signature · 3.3 Ask with a payload · 3.4 Summary

What you learn in chapter 3 →

Chapter 4: Akka test kit

4.1 Testing approaches · 4.2 Sync testing · 4.2.1 Effects · 4.2.2 More than one actor · 4.2.3 Testing the logs · 4.3 Async testing · 4.3.1 Using probes · 4.3.2 Fishing for messages · 4.3.3 Logging · 4.3.4 Log capturing · 4.4 Summary

What you learn in chapter 4 →

Chapter 5: Fault tolerance

5.1 What fault tolerance is (and what it isn’t) · 5.1.1 Plain old objects and exceptions · 5.1.2 Wrap it up and let it crash · 5.2 Actor lifecycle events: Signals · 5.3 Supervision strategies and signals · 5.3.1 Uneventful resuming · 5.3.2 Stopping and the PostStop signal · 5.3.3 Restart and the PreRestart signal · 5.3.4 Custom strategy · 5.4 Watching signals from an actor · 5.5 Back to the initial use case · 5.5.1 Supervisor hierarchy initial design · 5.5.2 Supervision hierarchy alternative design · 5.6 Summary

What you learn in chapter 5 →

Chapter 6: Discovery and routing

6.1 Discovery: The receptionist · 6.2 The built-in integration router pattern · 6.3 Balancing load using built-in routers · 6.3.1 Akka pool router · 6.3.2 Changing strategies · 6.3.3 Akka group router · 6.3.4 Consistent hashing strategy · 6.4 Implementing the router pattern using actors · 6.4.1 Content-based routing · 6.4.2 State-based routing · 6.5 Summary

What you learn in chapter 6 →

Chapter 7: Configuration

7.1 Trying out Akka configuration · 7.1.1 Order · 7.1.2 Subtrees · 7.1.3 Substitutions · 7.1.4 Using defaults · 7.2 Akka configuration · 7.3 Multiple systems · 7.3.1 Lifting with Fallback · 7.4 Configuration in tests · 7.4.1 Lifting in tests · 7.5 Summary

What you learn in chapter 7 →

Chapter 8: Clustering

8.1 On top of Akka Cluster · 8.2 Why use clustering? · 8.2.1 Cluster membership: Joining a cluster · 8.2.2 Minimal cluster example · 8.2.3 Starting the cluster · 8.2.4 Leaving the cluster · 8.2.5 Unreachable · 8.2.6 Downing a reachable node · 8.3 Akka Management and the Cluster HTTP extension · 8.3.1 Cluster subscriptions · 8.4 Clustered job processing · 8.4.1 In practice · 8.4.2 The code · 8.4.3 Work distribution in the master · 8.4.4 Starting the cluster · 8.5 Resilient job · 8.5.1 Serialization · 8.5.2 Testing is no different · 8.6 Summary

What you learn in chapter 8 →

Chapter 9: Sharding and persistence

9.1 Akka sharding and stateful systems · 9.1.1 The big picture · 9.1.2 An example: A shipping container · 9.1.3 The simplicity of the sharded entities · 9.1.4 Rebalancing configuration · 9.1.5 Passivation · 9.1.6 Remembering entities · 9.2 Persistence · 9.2.1 The ingredients · 9.2.2 Persistence combined with sharding: A persistent entity · 9.2.3 Available effects · 9.3 Customizing the persistent entity · 9.3.1 Failure · 9.3.2 Recovery · 9.3.3 Snapshotting · 9.3.4 Tagging · 9.3.5 A peek at serialization and schema evolution · 9.4 Running example · 9.5 Summary

What you learn in chapter 9 →

Chapter 10: Streams, persistence queries, and projections

10.1 Akka Streams · 10.1.1 Basic semantics · 10.1.2 Finite streams · 10.1.3 Source · 10.1.4 Flow · 10.1.5 Sink · 10.1.6 Blueprint · 10.1.7 Materialization · 10.1.8 Infinite streams · 10.2 Akka Persistence Query · 10.2.1 Where the rubber meets the road · 10.3 Projections · 10.3.1 Reading · 10.3.2 Writing · 10.3.3 Putting everything together · 10.3.4 The ShardedDaemonProcess · 10.3.5 Back to the SPContainer projection · 10.3.6 All the main parts · 10.4 Projections in action · 10.5 Summary

What you learn in chapter 10 →

Chapter 11: Akka ports

11.1 Akka HTTP · 11.1.1 Akka HTTP servers · 11.1.2 The path · 11.1.3 Directives · 11.1.4 Route directives · 11.1.5 Marshalling and unmarshalling · 11.1.6 Akka HTTP communicating with actors · 11.2 Akka gRPC · 11.2.1 The Protocol Buffers side · 11.2.2 The RPC side · 11.2.3 The plugin and the .proto file · 11.2.4 Akka gRPC in action · 11.2.5 Running the service · 11.2.6 Akka gRPC with an actor · 11.2.7 Running the example · 11.3 Summary

What you learn in chapter 11 →

Chapter 12: Real-world example: An Akka betting house

12.1 The actors · 12.1.1 The wallet · 12.1.2 The market · 12.1.3 The bet · 12.2 The ports · 12.2.1 The market · 12.3 Summary

What you learn in chapter 12 →

Chapter 13: Clustering, part 2

13.1 Akka Cluster Bootstrap · 13.1.1 Clustering in local · 13.1.2 Cluster in action · 13.2 Clustering with the Kubernetes API · 13.2.1 Creating the Docker image · 13.2.2 Kubernetes deployment · 13.2.3 Optional: Setting Java options · 13.2.4 Kubernetes role and role binding · 13.2.5 Service account · 13.3 Split Brain Resolver · 13.3.1 An unreachable problem · 13.3.2 SBR strategies · 13.4 Cluster singletons · 13.5 Summary

What you learn in chapter 13 →

Chapter 14: Connecting to systems with Alpakka

14.1 Alpakka Kafka · 14.1.1 Consuming from Kafka in action · 14.1.2 Detecting consumer failures · 14.1.3 Auto-commit · 14.1.4 Committable sources · 14.2 Pushing to Kafka · 14.2.1 At-most-once delivery guarantee · 14.2.2 At-least-once delivery guarantee · 14.3 Effectively-once delivery · 14.4 Alpakka CSV · 14.4.1 Mapping by column · 14.4.2 Reading and writing with FileIO · 14.5 Summary

What you learn in chapter 14 →

Chapter 15: Akka betting house, part 2

15.1 Projections · 15.1.1 Database projection · 15.1.2 Kafka projection · 15.1.3 The betting-house entry point · 15.2 Configuration · 15.2.1 Persistence · 15.2.2 Cluster local · 15.2.3 Cluster Kubernetes · 15.2.4 Services, sharding, and projections · 15.3 Deployment · 15.3.1 Running local · 15.3.2 Running in Kubernetes · 15.4 Summary

What you learn in chapter 15 →

Chapter 16: Akka Streams, part 2

16.1 Processing elements through services · 16.1.1 CPU-bounded services · 16.1.2 Non-CPU bounded services · 16.2 Connecting to an actor · 16.3 Dealing with exceptions · 16.3.1 Alternative 1: Deciders · 16.3.2 Alternative 2: Modeling exceptions as data · 16.3.3 divertTo · 16.3.4 Restarting the source · 16.4 Adding elements dynamically to a stream · 16.5 Summary

What you learn in chapter 16 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.