Reactive Applications with Akka.NET
Anthony Brown
  • March 2019
  • ISBN 9781617292989
  • 280 pages
  • printed in black & white

An introduction to how we're going to write software in the future.

Dror Helper, CodeValue
Reactive Applications with Akka.NET is a hands-on book that builds on fundamental concepts to teach you how to create reliable and resilient applications in the reactive style.

About the Technology

Enterprise-scale software needs to be unfailingly reliable, consistently performant under unpredictable loads, and easy to scale and maintain. Reactive applications guarantee these qualities through clear isolation of system components and message-based communication. Akka.NET ports the battle-tested Akka Actors toolkit from the JVM, radically simplifying the concurrency and asynchronous message handling at the heart of a reactive system.

About the book

Reactive Applications with Akka.NET teaches you to write high-performance, concurrent systems without explicitly managing threads and locking. You'll experience the power of Akka.NET and the Actors concurrency model by exploring a real-world case study in each chapter. As you go further, you'll start to grok the power of asynchronous communication in a distributed environment and take on practical tasks like deploying, debugging, and establishing performance guarantees.
Table of Contents detailed table of contents

Part 1 The road to reactive

1 Why reactive?

1.1 The heart of the Reactive Manifesto

1.2 Reactive systems vs. reactive programming

1.3 Applying Akka.NET

1.3.1 Where to use Akka.NET

1.3.2 Where not to use Akka.NET

1.4 How does Akka.NET work?


2 Reactive application design

2.1 Basic reactive system design

2.2 Reactive e-commerce application with actors

2.2.1 A reactive shopping cart

2.2.2 Changing states of actors

2.2.3 Making the purchase

2.2.4 Data transfer between services

2.2.5 Scaling work with routers

2.2.6 Wrapping up

2.3 Building on reactive foundations

2.3.1 Publishing the e-commerce application to the world

2.3.2 Storing state within actors

2.3.3 Scaling out across a cluster of machines

2.3.4 Continuing to react to environmental changes

2.3.5 Wrapping up


Part 2 Digging in

3 Your first Akka.NET application

3.1 Setting up an application

3.2 Actors

3.2.1 What does an actor embody?

3.2.2 What can an actor do?

3.2.3 Defining an actor

3.2.4 Wrapping up

3.3 Deploying an actor

3.3.1 The actor system

3.3.2 Spawning an actor

3.3.3 Wrapping up

3.4 Communicating with actors

3.4.1 Actor addresses and references

3.4.2 Sending a message

3.4.3 Wrapping up

3.5 Case study: Actors, concurrency, and phone billing


4 State, behavior, and actors

4.1 Preparing for the next message

4.2 Setting appropriate runtime behaviors

4.2.1 Switchable behaviors

4.2.2 Become and unbecome

4.2.3 Wrapping up

4.3 Finite state machines

4.3.1 Understanding finite state machines

4.3.2 Using finite state machines in a concurrency model

4.3.3 Converting a finite state machine into an actor

4.3.4 Using the finite state machine actor

4.3.5 Wrapping up

4.4 Case study: State machines, states and events, marketing analytics campaign


5 Configuration, dependency injection, and logging'

5.1 Why do you need configuration?

5.2 Configuring an actor deployment

5.2.1 Understanding Props

5.2.2 Wrapping up

5.3 Dependency injection (DI)

5.3.1 Introducing dependency injection

5.3.2 Configuring a DI container

5.3.3 Wrapping up

5.4 Configuring with HOCON

5.4.1 What is HOCON?

5.4.2 Loading configuration into an actor system

5.4.3 Wrapping up

5.5 Logging

5.5.1 Why do you need logging?

5.5.2 Writing to the log

5.5.3 Customizing a logger deployment

5.5.4 Wrapping up

5.6 Case study: Configuration and distributed systems


6 Failure handling

6.1 Understanding failures

6.2 Handling application-level failures

6.2.1 Responding to application errors

6.2.2 The Akka.NET supervision tree

6.2.3 Failing fast

6.2.4 The actor lifecycle

6.2.5 Watching for the deaths of other actors

6.2.6 Interface-level failures

6.2.7 Wrapping up

6.3 Understanding transport-level failures

6.3.1 Writing applications that handle message loss

6.3.2 Wrapping up

6.4 Case study: Supervision, failure, chat bots


7 Scaling in reactive systems

7.1 Scaling up and scaling out

7.2 Distributing work

7.2.1 Routers

7.2.2 Pools and groups

7.2.3 Wrapping up

7.3 Routing strategies

7.3.1 Random routing

7.3.2 Round-robin routing

7.3.3 Smallest-mailbox router

7.4 Case study: Scaling, throughput, advertising systems


8 Composing actor systems

8.1 Introducing Akka.NET remoting

8.2 Preparing to use remoting

8.2.1 Installing Akka.Remote

8.2.2 Configuring remoting for a project

8.3 Communicating with remote actors

8.3.1 Sending messages to remote actors

8.3.2 Remote deployment of actors

8.3.3 Wrapping up

8.4 Elastic scale across machines

8.4.1 Configuring a router to use multiple machines

8.4.2 Wrapping up

8.5 Failure handling across machines

8.6 Akka.Remote security

8.6.1 Limiting messages that can be sent over the network

8.6.2 Restricting available remote actor targets

8.6.3 Wrapping up

8.7 Case study: Remoting, network applications, web server, and backend server


Part 3 Real-life usage

9 Testing Akka.NET actors

9.1 Introducing Akka.TestKit

9.2 Unit testing actors

9.2.1 Spawning test actors

9.2.2 Validating internal data

9.2.3 Testing FSMs

9.2.4 Wrapping up

9.3 Integration testing actors

9.3.1 Creating test specifications

9.3.2 Asserting message responses

9.3.3 Time-based testing

9.3.4 Test probes

9.3.5 Wrapping up

9.4 Testing distributed applications with MultiNode TestKit

9.4.1 MultiNode specs

9.4.2 Testing individual actor systems

9.4.3 Barriers

9.4.4 Testing for network failure

9.4.5 Wrapping up

9.5 Case study: Testing, test-driven development, unit testing


10 Integrating Akka.NET

10.1 Integrating with ASP.NET

10.2 Integrating with SignalR

10.2.1 Communicating through an actor

10.2.2 Connecting to the user’s web browser

10.2.3 Wrapping up

10.3 Custom integrations with

10.3.1 Creating a listening socket

10.3.2 Sending data through

10.3.3 Wrapping up

10.4 Case study: IO, integration, IoT applications


11 Storing actor state with Akka.Persistence

11.1 Understanding event sourcing

11.2 Using Akka.Persistence

11.2.1 Writing persistent actors

11.2.2 Configuring a journal

11.2.3 Wrapping up

11.3 Akka.Persistence performance tuning

11.3.1 Snapshot stores

11.3.2 Async write journals

11.3.3 Wrapping up

11.4 Akka.Persistence performance tuning

11.4.1 At-least-once delivery

11.4.2 Upgrade strategies for applications using event sourcing

11.4.3 Wrapping up

11.5 Case study: Persistence, storage, staged upgrades


12 Building clustered applications with Akka.Cluster

12.1 Introducing Akka.Cluster

12.2 Cluster-aware routers

12.2.1 Creating cluster-aware router groups

12.2.2 Creating cluster-aware router pools

12.2.3 Wrapping up

12.3 Working with cluster gossip

12.3.1 Retrieving cluster state

12.3.2 Handling cluster gossip messages

12.3.3 Wrapping up

12.4 Cluster singleton

12.4.1 Wrapping up

12.5 Cluster sharding

12.5.1 Creating a new shard

12.5.2 Communicating with actors in a shard

12.5.3 Handling passivation in shards

12.5.4 Wrapping up

12.6 Distributed publish-subscribe

12.6.1 Topic messaging

12.6.2 Point-to-point messaging

12.6.3 Wrapping up

12.7 Cluster client

12.8 Case study: Clustering, scaling, cluster management


13 Akka.NET and reactive programming in production

13.1 Designing with actors

13.2 Handling failure

13.3 Designing for scale

13.4 Handling configuration

13.5 Ingesting data

13.6 Testing

13.7 Real-time integration

13.8 Data persistence

13.9 Cluster scale-out

13.8 Data persistence


What's inside

  • Reactive application design
  • Dealing with application-level failures
  • Integrating Akka.NET with other frameworks
  • Applying reactive programming to the real world

About the reader

Readers should be comfortable with C# or F# and the .NET framework.

About the author

Anthony Brown is a .NET consultant specializing in F# and reactive systems.

placing your order...

Don't refresh or navigate away from the page.
print book $26.99 $44.99 pBook + eBook + liveBook
Additional shipping charges may apply
Reactive Applications with Akka.NET (print book) added to cart
continue shopping
go to cart

eBook $28.79 $35.99 3 formats + liveBook
Reactive Applications with Akka.NET (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.
customers also reading

This book 1-hop 2-hops 3-hops

FREE domestic shipping on three or more pBooks