You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2013/11/03 15:35:17 UTC

[jira] [Comment Edited] (CAY-1879) Concurrent non-blocking read-only DataContext

    [ https://issues.apache.org/jira/browse/CAY-1879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13812385#comment-13812385 ] 

Andrus Adamchik edited comment on CAY-1879 at 11/3/13 2:34 PM:
---------------------------------------------------------------

We may see some improvement by starting to use ReadWriteLock in the ObjectStore (to make 'getNode' more concurrent), however in my tests the real noticeable blocking happens only when we would need the "write" lock to load query results. So this will only be a negligible improvement. From ReadWriteLock javadocs:

"Further, if the read operations are too short the overhead of the read-write lock implementation (which is inherently more complex than a mutual exclusion lock) can dominate the execution cost, particularly as many read-write lock implementations still serialize all threads through a small section of code. Ultimately, only profiling and measurement will establish whether the use of a read-write lock is suitable for your application. "

Although I may still replace synchronized blocks with mutex Lock implementation (ReentrantLock), as this will allow to turn Lock into a strategy and reuse the same ObjectStore in the new implementation.


was (Author: andrus):
We may see some improvement by starting to use ReadWriteLock in the ObjectStore (to make 'getNode' more concurrent), however in my tests the real noticeable blocking happens only when we would need the "write" lock to load query results. So this will only be a negligible improvement.

> Concurrent non-blocking read-only DataContext
> ---------------------------------------------
>
>                 Key: CAY-1879
>                 URL: https://issues.apache.org/jira/browse/CAY-1879
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Core Library
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>
> This Jira is about experimentation to achieve better individual DataContext select throughout per [1]. 
> [1] http://cayenne.markmail.org/thread/jdepwrjicovdw2m4



--
This message was sent by Atlassian JIRA
(v6.1#6144)