Reactive Applications with Akka.NET
Anthony Brown
  • MEAP began January 2016
  • Publication in September 2018 (estimated)
  • ISBN 9781617292989
  • 350 pages (estimated)
  • printed in black & white

This book gives a good solid introduction to Akka.NET.

Nick McGinness

Developing applications in a reactive style ensures that the experience is always responsive. Akka.NET is a framework for building distributed, message-driven applications which are able to stay responsive for the user even in the face of failure or when faced with more users. It makes it easy for .NET developers to write applications which are able to react to changes in their environment.

Table of Contents detailed table of contents

Part 1: The road to reactive

1. Why Reactive?

1.1. What does it mean to be reactive?

1.1.1. The heart of the Reactive Manifesto

1.1.2. Reactive systems vs reactive programming

1.2. Applying Akka.NET

1.2.1. Where to use Akka.NET

1.2.2. Where not to use Akka.NET

1.3. How does Akka.NET work?

1.4. What will you learn in this book?

1.5. Conclusion

2. Reactive Application Design

2.1. Basic reactive system design

2.2. Reactive e-commerce application design 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. Reactive application design patterns summary

2.3. Building on top of the 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. Building on top of the reactive foundations summary

2.4. Summary

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. Summary

3.3. Spawning an actor

3.3.1. The actor system

3.3.2. Spawning an actor

3.3.3. Summary

3.4. Communicating with actors

3.4.1. Actor addresses and references

3.4.2. Sending a message

3.4.3. Summary

3.5. Case Study: Actors ? Concurrency ? Phone billing

3.5.1. Summary

4. State, behavior and actors

4.1. Preparing for the next message

4.2. Setting appropriate receive behavior in Akka.NET

4.2.1. Switchable behaviors

4.2.2. Become and Unbecome

4.2.3. Switchable behavior summary

4.3. Finite state machines

4.3.1. Understanding finite state machines

4.3.2. The use 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. Finite state machine summary

4.4. Case Study: State machines ? States + events ? Marketing analytics campaign

4.5. Summary

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.3. Actor configuration summary

5.4. Dependency injection

5.4.1. Introducing dependency injection

5.4.2. Configuring an inversion of control container

5.4.3. Dependency injection summary

5.5. HOCON ? A human-readable configuration file format

5.5.1. What is HOCON?

5.5.2. Loading configuration into an actor system

5.5.3. HOCON summary

5.6. Logging

5.6.1. Why do you need logging?

5.6.2. Writing to the log

5.6.3. Customising a logger deployment

5.6.4. Logging summary

5.7. Case Study: Configuration ? Distributed systems ? Docker?

5.8. Summary

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. Application-level failures summary

6.3. Understanding transport-level failures

6.3.1. Writing applications that handle message loss

6.3.2. Transport-level failure summary

6.4. Case Study: supervision ? failure ? chat bots

6.5. Summary

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. Distributing work summary

7.3. Routing strategies within Akka.NET

7.3.1. Random routing

7.3.2. Round robin routing

7.3.3. Shortest mailbox queue

7.3.4. Consistent hashing

7.3.5. Scatter gather first completed

7.3.6. Tail chopping router

7.3.7. Routing strategies summary

7.4. Case study: scaling ? throughput ? advertising systems

7.5. Summary

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. Remote actor system addresses

8.3.2. Sending messages to remote actors

8.3.3. Remote deployment of actors

8.3.4. Remote actor communication summary

8.4. Elastic scale across machines

8.4.1. Configuring a router to use multiple machines

8.5. Failure handling across machines

8.5.1. Supervisor strategies across a network

8.5.2. Remoting deathwatch

8.5.3. Failure handling across machines summary

8.6. Akka.Remote security

8.6.1. Limiting messages able to be sent over the network

8.6.2. Restricting available remote actor targets

8.6.3. Akka.Remote security summary

8.7. Case study: remoting ? network applications ? web server and backend server

8.8. Summary

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. Unit testing actors summary

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. Integration testing actors summary

9.4. Testing distributed applications with the MultiNode Testkit

9.4.1. MultiNode specs

9.4.2. Running code on individual actor systems

9.4.3. Barriers

9.4.4. Testing for network failure

9.4.5. MultiNode Testkit summary

9.5. Case study: testing ? test-driven development ? unit testing

9.6. Summary

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. Integrating with SignalR summary

10.3. Custom integrations with Akka.IO

10.3.1. Creating a listen server

10.3.2. Sending data through Akka.IO

10.3.3. Akka.IO Summary

10.4. Case study: IO ? integration ? IoT applications

10.5. Summary

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. Using Akka.Persistence summary

11.3. Akka.Persistence performance tuning

11.3.1. Snapshot stores

11.3.2. Async write journals

11.4. Akka.Persistence performance tuning

11.4.1. At-least-once delivery

11.4.2. Upgrade strategies for applications using event sourcing

11.5. Case study: persistence ? storage ? staged upgrades

11.6. Summary

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. Cluster-aware routers summary

12.3. Working with cluster gossip

12.3.1. Retrieving the cluster state

12.3.2. Handling cluster gossip messages

12.3.3. Working with cluster gossip messages summary

12.4. Cluster singleton

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 within shards

12.5.4. Akka.Cluster.Sharding summary

12.6. Distributed publish and subscribe

12.6.1. Topic-based messaging

12.6.2. Point-to-point messaging

12.6.3. Distributed publish/subscribe summary

12.7. Cluster client

12.8. Case study: clustering ? scaling ? cluster management

12.9. Summary

13. Applying Akka.Net and reactive programming to a production problem

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.10. Conclusion

About the Technology

Reactive Applications with Akka.NET begins with an overview of reactive and a sample application written in the reactive style. You'll learn concepts of the actor model and what these mean in a real-world reactive context. This hands-on book builds on fundamental concepts to teach you how to create reliable and resilient applications. You'll also learn useful Akka.NET features for building real-world applications. By the end of the book, you'll be able to look at a problem domain and understand how to create applications which are able to withstand the demands of a modern day application.

What's inside

  • Real-world applications of Akka.NET and reactive applications
  • Designing an Internet of Things architecture with reactive in mind
  • Building applications to handle the demands of the modern era of software
  • Integrating Akka.NET with your existing .NET stack
  • Deploying Akka.NET applications to the cloud

About the reader

Readers should be comfortable with C# or F# and the .NET framework. No previous reactive experience needed.

About the author

Anthony Brown has been developing software for several years, primarily using the .NET framework. He's a regular speaker at conferences on tools and techniques to rapidly build systems that work.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
buy
Reactive Applications with Akka.NET (combo) added to cart
continue shopping
go to cart

MEAP combo $44.99 pBook + eBook + liveBook
Reactive Applications with Akka.NET (eBook) added to cart
continue shopping
go to cart

MEAP eBook $35.99 pdf + ePub + kindle + liveBook

FREE domestic shipping on three or more pBooks

Essential reference to using Akka.NET.

Jeff Smith

An excellent in depth and practical book which should be read by anyone who is interested in developing and designing next generation concurrent applications.

Dror Helper