[Yanel-dev] Concurrent Read Write Locks
Michael Wechner
michael.wechner at wyona.com
Wed May 30 14:43:45 CEST 2012
Hi Balz
I remember that you once suggested how we should improve concurrent
read/write operations, but
unfortunately I cannot find your email anymore.
I think the behaviour should be as follows:
- Concurrent read operations do not block each other
- If a thread wants to write, then it first needs to wait until all
current read operations have finished
- A write operation blocks new read requests until the writing has finished
It seems to me the following articles describe the solution quite nicely
http://www.javalobby.org/java/forums/t45090.html
http://tutorials.jenkov.com/java-concurrency/read-write-locks.html
WDYT?
As an alternative we could also implement the functionality, that if a
repository has revisions enabled and
if revisions are actually being created, that the read process always
accesses the most recent revision, which
would normally be the same as accessing the actuall node. Of course the
creation of the revision would also have to be locked.
Thanks
Michael
More information about the Yanel-development
mailing list