kanaloa icon indicating copy to clipboard operation
kanaloa copied to clipboard

QueryStatus is only used by tests

Open nsauro opened this issue 7 years ago • 1 comments

Originally, QueryStatus was used by the AutoScaler, but has since changed. QueryStatus is now only used by tests to access an Actor's state.

We should investigate this a bit more to see if we want to continue doing this. One alternative, is to use TestActorRef in these cases. But this means that the values that were being returned via QueryStatus would need to be publicly accessible on the trait/class.

nsauro avatar Jul 29 '16 17:07 nsauro

Personally, I don't have a problem with mutable state on Actors, so I would just put those fields on there and call it a day. However, I can understand reservations to this approach. If we convert all of our Actor implementations to classes(vs traits), does that help any? It would purely a philosophical change, because, ultimately an Actor's implementation is always hidden by the ActorRef in any system. At least by making it a class, we aren't publishing a trait(which is meant for public consumption(one could argue anyway), and as such we avoid the weirdness of having public things on a trait, which aren't meant to be publicly accessible(although, like noted before, in reality/practice ultimately, they will always be hidden).

nsauro avatar Jul 29 '16 17:07 nsauro