[akka-user] Re: Reader Writer Lock using Actor Model in Akka

2016-03-20 Thread Rafał Krzewski
Are you sure you are approaching the problem from the best angle? Akka gives you a guarantee that the execution of actor code is single threaded, so each time a message is processed, the code has an "exclusive lock" on the actor's internal state (quotation marks because there is actually no loc

[akka-user] Re: Reader Writer Lock using Actor Model in Akka

2016-03-19 Thread Guido Medina
Akka Agents do that exactly, you can read anytime while writes happen serially, of course Agents cannot benefit AFAIK from Akka Sharding functionality for example, hence making stash just like CurioDB does a better fit (if you need to redistribute these values) Regards, Guido. On Thursday, Ma

[akka-user] Re: Reader Writer Lock using Actor Model in Akka

2016-03-19 Thread Stephen McDonald
On Friday, 18 March 2016 08:59:14 UTC+11, Rafał Krzewski wrote: > > Are you sure you are approaching the problem from the best angle? Akka > gives you a guarantee that the execution of actor code is single threaded, > so each time a message is processed, the code has an "exclusive lock" on > t

[akka-user] Re: Reader Writer Lock using Actor Model in Akka

2016-03-19 Thread Guido Medina
Trying to emulate a read/write lock with actors can be very difficult, maybe agents can do? http://doc.akka.io/docs/akka/snapshot/java/agents.html HTH, Guido. On Thursday, March 17, 2016 at 3:52:47 PM UTC, neel choudhury wrote: > > I want to implement the famous reader writer model using actor