cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CAY-1879) Concurrent non-blocking read-only DataContext
Date Sun, 03 Nov 2013 14:35:17 GMT

    [ 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)

Mime
View raw message