-
Notifications
You must be signed in to change notification settings - Fork 44
Self managing actors
While Akka.NET gives you a full control over your actors, sometimes you may decide to resign from part of it order to work on simpler conceptual model. This is where Akka.Cluster.Sharding and it's Akkling.Cluster.Sharding extension comes to work.
Akkling cluster sharding introduces few new functions:
-
spawnSharded
andspawnShardedAsync
work like traditionalspawn
function with one difference - they take a mapping function as first parameter used to resolve shard and entity ids and also payload itself from sent message. Shard and entity ids are part of sharding mechanism, which allows you to address an actor without having its reference, knowing its location inside the cluster or even knowing if it exists or not. In last case required actor will be created automatically within a shard on one of the provided cluster nodes - usually the less occupied one. -
spawnShardedProxy
andspawnShardedProxyAsync
allows you to communicated with actors living inside shards with this difference, that they can live on cluster nodes that don't participate in sharding process themselves.
Go to examples page to see sharded actors in action.
- Introduction
- Bootstrapping actor system
- Creating an actor
- Static type safety
- Effects
- Managing actor's lifecycle
- Supervision strategies
- Event bus
- Logging
- Socket I/O
- Persistence
- Cluster sharding