Hi Brice,
I answered this exact question on the ML less than 6h ago. Please search the archive prior to posting - it saves time for everyone.
Thanks,
V
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
On 01/06/12 18:22, √iktor Ҡlang wrote:Fair enough :)
> I answered this exact question on the ML less than 6h ago. Please search
> the archive prior to posting - it saves time for everyone.
So I did my homework and I _think_ you're mentioning the following thread:
https://groups.google.com/group/akka-user/browse_thread/thread/77688c45b75cc9f3
The whole thread basically says that we shouldn't try to get the actor
path by ourselves, we should serialize it. That's good, unless like me
you don't yet have any actors, or you just want to expose a given
ActorSystem (and the rest of your system just knows the path of the
running actors it wants to contact by convention or other means).
Then your last answer to the thread is what I tried by myself, let me
paste my original message again:
> (system / "").toStringWithAddress(Serialization.currentTransportAddress.value)I believe I'm encountering a chicken and egg problem here. The
> only returns null (presumably Serialization.currentTransportAddress.value is null).
currentTransportAddress is not defined yet because the ActorSystem is
not yet "started" (understand there is no actors running inside yet, or
the remote part has not yet been used), because my application at the
time it registers itself in zookeeper is still initializing.
Yet I have
to "export" this ActorSystem address to the exterior world before some
other dependent parts get initialized that will in turn create the actors.
For the moment I fixed the problem by computing this url myself (the
format is known), but that feels somewhat clumsy.
So, let me rephrase my original question: how do I make sure the remote
part is initialized so that I can get access to the transport address value?
Thanks in advance,
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
None of this is at all clear. We have a similar requirement. A central actor is contacted by remote agent VMs. We need to track the address of the remote system, but the sender is a local actor. We can transiently communicate with the remote via that sender reference, but it doesn't persist and we can't use the Address part for instance as an identifier/discriminator value.
To put is simply, all we need is a way to dereference the remote sender's Address.
It is quite surprising that a remote actor's Address (when a sender) is not the remote actor's address.
All help appreciated, we've wasted a lot of time on this so far.
On Saturday, 2 June 2012 04:41:29 UTC+10, √ wrote:
--
Viktor Klang
Akka Tech Lead
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/r0m0tB7K9yEJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
On Monday, 4 June 2012 18:13:31 UTC+10, √ wrote:Hi Jed,
On Mon, Jun 4, 2012 at 9:39 AM, Jed Wesley-Smith wrote:None of this is at all clear. We have a similar requirement. A central actor is contacted by remote agent VMs. We need to track the address of the remote system, but the sender is a local actor. We can transiently communicate with the remote via that sender reference, but it doesn't persist and we can't use the Address part for instance as an identifier/discriminator value."doesn't persist" makes me wonder how you're persisting it. When you manually serialize an ActorRef you need to provide the Address if it's local, as the address could change.
We save a reference to remote actors in memory, the last seen value gets all the traffic. This is for a cluster controller where each node registers with it.
To put is simply, all we need is a way to dereference the remote sender's Address.Have you've tried actorRef.path.address?
Yep, please see the separate post on it, we should move there.
It is quite surprising that a remote actor's Address (when a sender) is not the remote actor's address.May we know which address you expect and which one you get?
Address(akka, dooby.atlassian.com, port, whatever) vs Address(akka, localhost, port, whatever)
All help appreciated, we've wasted a lot of time on this so far.May I interest you in the Typesafe Subscription, which includes Akka support?
I put in a request for pricing, we'll see. At the moment we're in proof of concept stage (which of course is when you need all the support ;-)
thanks mate for the quick replies,
jed.
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/AXjLGdKuId8J.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.