In my particular case, I have an ActorSelection that I'm trying to send to. 
If I could feed that to `deliver` directly, the code would be quite simple. 

Right now I'm getting an ActorPath from the selection by doing 
`ActorPath.fromString(actorSelection.toSerializationFormat)`, although this 
feels a little evil. The more correct approach seems to be sending an 
`Identify` message to the `actorSelection` and handling the response (or 
lack thereof). 

It would appear to be much simpler and less error prone if `deliver` 
accepted an ActorSelection rather than having to convert back and forth 
between the selection and the path.

On Tuesday, November 18, 2014 4:20:29 AM UTC-5, Akka Team wrote:
>
> Hi Ryan,
> Thanks for the feedback!
>
> API wise I do feel it’s a bit more usable by asking for a ActorPath 
> instead of a selection, since selection is when you “look for someone”,
> and you’d have to system.actorSelection(sender().path) for example. By 
> taking an ActorPath you’re able to simply write: deliver(msg.path, ...).
>
> Semantics wise you’re right that selection / paths are used because 
> ActorRef won’t do here, 
> but I’m not seeing how the use of actorSelection in the API here would be 
> beneficial.
>
> Would you be able to show an example where it makes more sense to use 
> selection than just paths for deliver()?
> ​
>
> -- 
> Cheers,
> Konrad `ktoso` Malawski
> Typesafe - The software stack for applications that scale
> Blog: letitcrash.com
> Twitter: @akkateam
>  

-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to