Hello hAkkers,
I have a component, Akka Extension, to be exact, which has one managing
actor supervising several "worker" actors ()with different logic and roles).
I want to be able to provide users of extension with stable ActorRef's of
worker actors:
class MyExtension(system: ExtendedActorSystem) extends Extension {
val manager = system actorOf (ManagerActor.props(), "manager")
val actor1: ActorRef = ...
val actor2: ActorRef = ...
}
I see two ways of doing so:
1. Use ActorSelection instead of ActorRef -- I have stable names and all
selections will be 1-to-1, but still there will be some overhead;
2. Provide users with Future[ActorRef] and let ManagerActor complete
Promise[ActorRef], but than users will always have to deal with Future's
.foreach, .map etc.
Surely I don't want to Await till all ActorRef futures is resolved.
I think that a good solution would be to wrap Future[ActorRef] as ActorRef
instance, that delays all communication till the future is resolved and
forwards after that.
The question is -- maybe I'm overlooking some much more simpler and already
existent solution?
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.