ClusterSystem: departure from system.actorOf
A cluster is one logical actor hierarchy which spans multiple nodes, hence it does not make sense to support
The remaining question becomes then what to do about
Please comment.
system.actorOf
: instead Props
need to be supplied when creating the system, to be instantiated as the system’s guardian as described in #2305. Since ActorSystem will still be used locally and must retain the capability of creating top-level local actors, introduce a new ClusterSystem
which does not extend ActorRefFactory
.The remaining question becomes then what to do about
context.system
, which would still have to extend ActorRefFactory
as otherwise actors could not be reused when going from “local” to “cluster”. Two possible solutions would be:- throw an exception, necessitating the adaption of the actor to cluster rules
- send a message to the guardian to ask it to create the actor, which would make it possible to keep the actor working by supplying a suitable cluster guardian
Please comment.
Leave a comment
on 2012-07-03 14:47 *
By Jonas Bonér
The other solution is to:
1. remove ActorSystem.actorOf
2. add it as an extension
3. make an implicit conversion from system -> the extension
4. add it to akka.actor package object
1. remove ActorSystem.actorOf
2. add it as an extension
3. make an implicit conversion from system -> the extension
4. add it to akka.actor package object
on 2012-11-01 12:29 *
By viktorklang
I think this needs way more thought on the implications and what it actually solves to be able to get it done before Christmas.