pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steven Schlansker <stevenschlansker@gmail.com>
To: Markus KARG <markus@headcrashing.eu>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: Adding new dependencies for in-core
Date: Tue, 30 Jun 2015 10:09:16 -0700
Message-ID: <3A641C7E-04D2-4554-8CDC-37A11E0178AB@gmail.com> (raw)
In-Reply-To: <011501d0b357$26f1eca0$74d5c5e0$@eu>
References: <CAB=Je-GR+Qs85tUsGAD+5UtyTgYPdAvb8NOmThni5heUhOzT+Q@mail.gmail.com>
	<011501d0b357$26f1eca0$74d5c5e0$@eu>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

It is a Concurrent *Linked* HashMap, which presumably facilitates LRU removal.

On Jun 30, 2015, at 10:06 AM, Markus KARG <markus@headcrashing.eu> wrote:

> Vladimir,
> 
> 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?
> 
> -Markus
> 
> -----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
> 
> Hi,
> 
> 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 implement the cache.
> 
> We don't need all the stuff CLHM has, but I see no easy&scalable way of doing concurrent map with eviction by mere java.util.concurrent stuff.
> 
> 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.
> 
> 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...)
> 
> I'm more inclined to the "add regular dependency" approach.
> 
> I expect similar question might appear if we consider using netty for IO.
> 
> --
> Regards,
> Vladimir Sitnikov
> 
> 
> -- 
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
> 
> 
> 
> -- 
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (14+ messages)  latest in thread

Message-ID: <3A641C7E-04D2-4554-8CDC-37A11E0178AB@gmail.com>
Permalink:  ../3A641C7E-04D2-4554-8CDC-37A11E0178AB@gmail.com/
Also on:    postgresql.org/message-id/3A641C7E-04D2-4554-8CDC-37A11E0178AB@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: stevenschlansker@gmail.com, markus@headcrashing.eu
  Subject: Re: Adding new dependencies for in-core
  In-Reply-To: <3A641C7E-04D2-4554-8CDC-37A11E0178AB@gmail.com>
  References: <CAB=Je-GR+Qs85tUsGAD+5UtyTgYPdAvb8NOmThni5heUhOzT+Q@mail.gmail.com> <011501d0b357$26f1eca0$74d5c5e0$@eu> <3A641C7E-04D2-4554-8CDC-37A11E0178AB@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox