Patrik Nordwall
Typesafe - The software stack for applications that scale
Twitter: @patriknw
--
You received this message because you are subscribed to the Google Groups "Akka Developer List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Akka Developer List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Thanks! It's probably no surprise that I also like the second alternative.I'm a bit worried if there is a chance that the uid is lost in places where it shouldn't, such as in RemoteActorRef.getChild.
What do you think about the equals and compareTo as Endre and I talked about here: https://github.com/akka/akka/commit/5560f1defdc6efe628948799544420b857ae7d26#commitcomment-2786983Is it even possible to treat undefinedUid as a wildcard match in equals and compareTo? Does that violate the contract of those methods?
12 mar 2013 kl. 15:04 skrev Patrik Nordwall:Thanks! It's probably no surprise that I also like the second alternative.I'm a bit worried if there is a chance that the uid is lost in places where it shouldn't, such as in RemoteActorRef.getChild.That should be covered by tests (in this case RemoteCommunicationSpec IIRC).What do you think about the equals and compareTo as Endre and I talked about here: https://github.com/akka/akka/commit/5560f1defdc6efe628948799544420b857ae7d26#commitcomment-2786983Is it even possible to treat undefinedUid as a wildcard match in equals and compareTo? Does that violate the contract of those methods?Hmm, that is a good questions. First of all compareTo and equals need to be compatible with each other. Then having a wildcard basically means that transitivity of the ordering relation is broken because while a == b == c you can still have a < c if b==wildcard. Is that a problem for sorting algorithms? We need to consider what happens if you put ActorRefs into collections.
I tend to think that equality should not have a wildcard, just as compareTo currently does not have it, and that we only apply the wildcard behavior when looking up child actors.
When fixing failing tests I realize that it's probably not feasable to include the uid in the toString representation of ActorPath because if users concatinate paths they will be invalid.I will exclude it from toString, but add another public method toRawString that includes it. That will be used for the serialized representation.