score:0

Accepted answer

The above code is an example of bad practice to wrap an actor inside a class. Ensure that the actor model is utilized instead of approaching it from an object oriented perspective.

In the above scenario, the structure to be defined is:

Broker -> UserActor -> User

Broker has a map and this can be used to resolve any dependencies with it. The model ensures that the actor model is separated from the object logic. Reference

Another alternative is to utilize Futures. This link is a great place to start.


Related Query

More Query from same tag