Hi
Soumya,Why do you have the concurrent hash map in the Actor at all?
When using Actors you can easily have a var with an immutable.Map
which you can update/read from the Actor's receive. If you need to use Futures,
apply the pipeTo pattern to forward the action to self.
Of course, if you actually have benchmarked this and observe that this is not fast enough
(though it should be fast enough for many use-cases) you could drop down to mutable things.
The reason I'd advertise to use vars with immutable datastructures is that you don't
have the problem of accidentally sending a mutable thing over to someone - in case
of the immutable Map you'd send an outdated version, but at least noone can break it.