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 model. We 
> can have multiple reader reading but only one writer can write. Also when a 
> writer writes no reader can read and vice versa.
>
> To solve this problem i thought of using a superviser actor which 
> maintains a set for reader actors and a queue for writer actors. Now a 
> writer can be dequeued and start writing when the set for readers are 
> empty. Also when the writer completes all reader actors from the set can 
> start reading.
>
> Can we have a better problem of solving this famous problem using actor 
> model?
>
> Also is this model better than the original reader writer problem soved 
> using read or write locks?
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to