Aaron Stannard / October 14, 2025
A different way to think about concurrency
Core concepts and APIs
public class GreeterActor : ReceiveActor
{
public GreeterActor()
{
Receive<Greet>(greet =>
{
Console.WriteLine($"Hello {greet.Name}!");
Sender.Tell(new Greeted(greet.Name));
});
}
}
Actors receive messages and respond asynchronously
// Messages are simple immutable data types
public record Greet(string Name);
public record Greeted(string Name);
Messages define the actor's protocol
// Create an ActorSystem
var system = ActorSystem.Create("MySystem");
// Create an actor
var greeter = system.ActorOf<GreeterActor>("greeter");
// Send a message
greeter.Tell(new Greet("World"));
Supervision hierarchies provide fault tolerance
Clustering and remoting
The actor model is not just about concurrency - it's about building resilient, distributed systems that can survive failures.
— Hewitt, Bishop, and Steiger (1973)
Proven patterns for production systems
Distribute work across actor pools
Prevent cascading failures
Control message flow rates
Persist actor state as events
var router = system.ActorOf(
Props.Create<WorkerActor>()
.WithRouter(new RoundRobinPool(5)),
"worker-router");
// Messages are distributed across 5 workers
for (int i = 0; i < 100; i++)
{
router.Tell(new Work(i));
}
Distribute work across a pool of actors
See it in action
Building a distributed chat system
With cluster sharding
And persistence
Questions?
https://aaronstannard.com
@aaronstannard