Akka in Action MEAP v13
Copyright
Table of Contents
Chapter 1: Introducing Akka
1.1 What is Akka
1.1.1 Simpler Concurrency
1.1.2 Fault Tolerance
1.1.3 Scale Up and Out
1.2 About Akka Actors and ActorSystems
1.3 Summary
Chapter 2: Up and Running
2.1 Clone, Build and Test Interface
2.1.1 Build with SBT
2.1.2 Fast forward to the GoTicks.com REST server
2.2 Explore the Actors in the App
2.2.1 Structure of the App
2.2.2 The Actor that handles the sale: TicketSeller
2.2.3 BoxOffice
2.2.4 REST Interface
2.3 Into the Cloud
2.3.1 Create the App on Heroku
2.3.2 Deploy and Run on Heroku
2.4 Summary
Chapter 3: Test Driven Development with Actors
3.1 Testing Actors
3.1.1 Preparing to Test
3.2 One-way messages
3.2.1 SilentActor Examples
3.2.2 SendingActor Example
3.2.3 SideEffectingActor Example
3.3 Two-way messages
3.4 Summary
Chapter 4: Fault tolerance
4.1 What is fault tolerance (and what it isn't)
4.1.1 Plain old objects and exceptions
4.1.2 Let it crash
4.2 Actor life-cycle
4.2.1 Start event
4.2.2 Stop event
4.2.3 Restart event
4.2.4 Putting the Life cycle Pieces Together
4.2.5 Monitoring the lifecycle
4.3 Supervision
4.3.1 Supervisor hierarchy
4.3.2 Predefined strategies
4.3.3 Custom Strategies
4.4 Summary
Chapter 5: Futures
5.1 The use case for Futures
5.2 In the Future nobody blocks
5.3 Futuristic Errors
5.4 Combining Futures
5.5 Futures and Actors
5.6 Summary
Chapter 6: Your first Distributed Akka App
6.1 Scaling out
6.1.1 Common network terminology
6.1.2 Reasons for a distributed programming model
6.2 Scaling Out with Remoting
6.2.1 Making the GoTicks App Distributed
6.2.2 Remote REPL action
6.2.3 Remote Lookup
6.2.4 Remote Deployment
6.2.5 Multi-JVM testing
6.3 Summary
Chapter 7: Configuration, Logging and Deployment
7.1 Configuration
7.1.1 Trying Out Akka Configuration
7.1.2 Using Defaults
7.1.3 Akka Configuration
7.1.4 Multiple systems
7.2 Logging
7.2.1 Logging in an Akka Application
7.2.2 Using Logging
7.2.3 Controlling Akka's logging
7.3 Deploying Actor-based Applications
7.3.1 Stand-alone application
7.3.2 Akka with a web application
7.4 Summary
Chapter 8: System Structure
8.1 Pipes and Filters
8.1.1 Enterprise integration pattern Pipes and Filters
8.1.2 Pipes and filters in Akka
8.2 Scatter-Gather Pattern
8.2.1 Applicability
8.2.2 Parallel tasks with Akka
8.2.3 Implement the scatter component using the
Recipient list
8.2.4 Implementing the gather component with the
Aggregator pattern
8.2.5 Combining the components into the
Scatter-Gather Pattern
8.3 Summary
Chapter 10: Message Channels
10.1 Channel types
10.1.1 Point to point
10.1.2 Publish subscribe
10.2 Specialized channels
10.2.1 Dead letter
10.2.2 Guaranteed delivery
10.3 Summary
Chapter 11: Finite State Machines and Agents
11.1 Using a Finite State Machine
11.1.1 Quick introduction of Finite State
Machine
11.1.2 Creating an FSM model
11.2 Implementation of an FSM model
11.2.1 Implementing transitions
11.2.2 Implementing the entry actions
11.2.3 Timers within FSM
11.2.4 Termination of FSM
11.3 Implement Shared state using agents
11.3.1 Simple Shared state with agents
11.3.2 Waiting for the state update
11.4 Summary
Chapter 12: Working with Transactions
12.1 Software Transactional Memory
12.1.1 Protecting shared data
12.1.2 Using the STM transactions
12.2 Agents within transactions
12.2.1 Reading from Agents within a
transaction
12.2.2 Updating Agents within a
transaction
12.3 Actors within transactions
12.3.1 Coordinated transactions
12.3.2 Creating transactors
12.4 Summary
Chapter 13: Integration
13.1 Message endpoints
13.1.1 Normalizer
13.1.2 Canonical Data Model
13.2 Implementing endpoints using the Camel
Framework
13.2.1 Implement a consumer endpoint receiving
messages from an external System
13.2.2 Implement a producer endpoint sending
messages to an external System
13.3 Example of implementing a REST
interface
13.3.1 The REST example
13.3.2 Implementing a Rest endpoint with
Spray
13.4 Summary
Chapter 14: Clustering
14.1 Why use Clustering?
14.2 Cluster Membership
14.2.1 Joining the cluster
14.2.2 Leaving the cluster
14.3 Clustered Job Processing
14.3.1 Starting the Cluster
14.3.2 Work Distribution using Routers
14.3.3 Resilient Jobs
14.3.4 Testing the Cluster
14.4 Summary