Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z9z2z-0004ng-LU for pgsql-jdbc@arkaria.postgresql.org; Tue, 30 Jun 2015 17:10:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Z9z2x-0004Or-Vk for pgsql-jdbc@arkaria.postgresql.org; Tue, 30 Jun 2015 17:10:12 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Z9z2I-0003oU-0w for pgsql-jdbc@postgresql.org; Tue, 30 Jun 2015 17:09:30 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Z9z2A-0004b7-GK for pgsql-jdbc@postgresql.org; Tue, 30 Jun 2015 17:09:28 +0000 Received: by pabvl15 with SMTP id vl15so8401655pab.1 for ; Tue, 30 Jun 2015 10:09:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=GQET3rtYR02ZIebkfoRLuDl1EQ2Xx3L2sMBAumQjMdg=; b=t938SpIvkjAqlO2FRk9ph6KvQaS6augtoIGDSQXWdlB2iat2pfP/6wpvodmXcBIfm+ z4fRDGZPx83nND55W2aqUKdlu7i3eokEaFaZJA2lJpnFaCQ3lMPUTpo4/50gju9Tsli7 johobYS+zTD2m08k2ex3ViyWrFHIHsaVc2ntNGp3krMWkcV1K2sz4mi5AU86heaR7WgS kjvHQQ/vYmu5kIHZtCiOHWmfQvvOnr69OpWlR1kCe5QqTt//02JQ6e43+1qY7GfM5ELk OSsxljUa2/Q/i0TXEregknwrbSVEy8OesJiGrHpi5k6y4wFFBQruOqwJJ/x8QuJjNBiN /B/w== X-Received: by 10.68.133.131 with SMTP id pc3mr45304005pbb.107.1435684160723; Tue, 30 Jun 2015 10:09:20 -0700 (PDT) Received: from [10.10.21.80] ([199.16.144.7]) by mx.google.com with ESMTPSA id nt6sm46157252pbc.18.2015.06.30.10.09.19 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Jun 2015 10:09:19 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Adding new dependencies for in-core From: Steven Schlansker In-Reply-To: <011501d0b357$26f1eca0$74d5c5e0$@eu> Date: Tue, 30 Jun 2015 10:09:16 -0700 Cc: List Content-Transfer-Encoding: quoted-printable Message-Id: <3A641C7E-04D2-4554-8CDC-37A11E0178AB@gmail.com> References: <011501d0b357$26f1eca0$74d5c5e0$@eu> To: Markus KARG X-Mailer: Apple Mail (2.1878.6) X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org It is a Concurrent *Linked* HashMap, which presumably facilitates LRU remov= al. On Jun 30, 2015, at 10:06 AM, Markus KARG wrote: > Vladimir, >=20 > sorry for being so ingorant not to give it a deeper thought, but what is = in CLHM what is not also in java.util.concurrent.ConcurrentHashMap? >=20 > -Markus >=20 > -----Original Message----- > From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql= .org] On Behalf Of Vladimir Sitnikov > Sent: Dienstag, 30. Juni 2015 14:21 > To: List > Subject: [JDBC] Adding new dependencies for in-core >=20 > Hi, >=20 > I've had a quick look into https://github.com/pgjdbc/pgjdbc/issues/345 > (Share parsed query texts across different connections) and it looks like= https://github.com/ben-manes/concurrentlinkedhashmap would be useful to im= plement the cache. >=20 > We don't need all the stuff CLHM has, but I see no easy&scalable way of d= oing concurrent map with eviction by mere java.util.concurrent stuff. >=20 > Well, I can do lock splitting (i.e. use multiple small LRU caches instead= of a single big cache), however that looks like reinventing the wheel. >=20 > Can you suggest what is the best way of adding CLHM dependency? > Should it be added in plain? > Should it be shaded? (i.e. renamed to org.postgresql.clhm...) >=20 > I'm more inclined to the "add regular dependency" approach. >=20 > I expect similar question might appear if we consider using netty for IO. >=20 > -- > Regards, > Vladimir Sitnikov >=20 >=20 > --=20 > Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-jdbc >=20 >=20 >=20 > --=20 > Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-jdbc --=20 Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc