3 ms·
> but it may be a pain when you actually want to share data between threads. (Like, say, a shared cache.) That's the main reason we wanted to make sure it was
by dansimon 12y ago
> but it may be a pain when you actually want to share data between threads. (Like, say, a shared cache.)
That's the main reason we wanted to make sure it was easy to interface with Akka actors. Assuming you couldn't get away with just using a ConcurrentHashMap or similar, it's very easy to put your shared state into an actor and pass the ActorRef to each event loop, so that all communication between the loops and the actor is through immutable message passing.
Akka's agents (synchronous immediate reads, asynchronous writes) also work really well when you have a read-heavy data-structure like a cache.