Return-Path: X-Original-To: apmail-cayenne-dev-archive@www.apache.org Delivered-To: apmail-cayenne-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0378D98FB for ; Thu, 23 Feb 2012 01:10:42 +0000 (UTC) Received: (qmail 73098 invoked by uid 500); 23 Feb 2012 01:10:41 -0000 Delivered-To: apmail-cayenne-dev-archive@cayenne.apache.org Received: (qmail 73076 invoked by uid 500); 23 Feb 2012 01:10:41 -0000 Mailing-List: contact dev-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list dev@cayenne.apache.org Received: (qmail 73068 invoked by uid 99); 23 Feb 2012 01:10:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2012 01:10:41 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL,TO_NO_BRKTS_PCNT X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [59.167.240.32] (HELO fish.ish.com.au) (59.167.240.32) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2012 01:10:34 +0000 Received: from ip-136.ish.com.au ([203.29.62.136]:60641) by fish.ish.com.au with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76) (envelope-from ) id 1S0NCE-0002OO-0X for dev@cayenne.apache.org; Thu, 23 Feb 2012 12:10:10 +1100 X-CTCH-RefID: str=0001.0A150202.4F4591F2.00D8:SCFSTAT16643310,ss=1,re=-4.000,fgs=0 Message-ID: <4F4591F1.70403@maniatis.org> Date: Thu, 23 Feb 2012 12:10:09 +1100 From: Aristedes Maniatis User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20120202 Thunderbird/11.0 MIME-Version: 1.0 To: dev@cayenne.apache.org Subject: Re: Non-blocking DataRowStore - need help to test References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 23/02/12 5:54 AM, Andrus Adamchik wrote: > Here is a potentially disruptive change to Cayenne core: > > http://svn.apache.org/viewvc?view=revision&revision=1292437 > (also see https://issues.apache.org/jira/browse/CAY-1670 ) > > This removes the major global lock and has a potential to significantly increase throughput (which is an issue, see CAY-1124 by Tore for instance). The implementation is based on a previously untried by us data structure - ConcurrentLinkedHashMap - http://code.google.com/p/concurrentlinkedhashmap/ . It is used by Apache Cassandra, so presumably it works and can handle the load. I internalized this code, placing it under org.apache.cayenne.util.concurrentlinkedhashmap. > > I need help with testing though... Maybe someone has any kind of load tests that can emulate multiple DataContexts attached to a single ServerRuntime and performing various select/modify operations? Or maybe you are daring enough to place this in production? I will do the same on my end. > > To give some reassurance, our single-threaded unit tests pass 100% with no changes after I swapped commons-collections LRUMap to ConcurrentLinkedHashMap. > > Appreciate feedback on this feature! Some questions rather than feedback at this stage: * ConcurrentLinkedHashMap seems to have a roadmap http://code.google.com/p/concurrentlinkedhashmap/wiki/Changelog and ongoing development. Since this is the case, is it wise to fork it into the Cayenne source rather than link to the built artifacts and make it easier to update in the future? * How does this new code interact and relate to third party caches such as OScache when used in Cayenne? I was never 100% clear about how the old one interacted, and I guess nothing much had changed in this regard, but it would be good to understand this better. * I see that version 2.0 will allow for pluggable eviction policies (They will switch between LRU and LIRS). And they mention the idea of weighting by key/value. Any thoughts about whether that would be useful to Cayenne to be able to implement even more flexible policies, particularly given the demise of OScache? Ari -- --------------------------> Aristedes Maniatis GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A