Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UG0Dw-0000oX-Ev for pgsql-jdbc@arkaria.postgresql.org; Thu, 14 Mar 2013 04:57:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UG0Dv-0005MZ-Vz for pgsql-jdbc@arkaria.postgresql.org; Thu, 14 Mar 2013 04:57:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UG0Dv-0005MU-AQ for pgsql-jdbc@postgresql.org; Thu, 14 Mar 2013 04:57:03 +0000 Received: from outmail149077.authsmtp.com ([62.13.149.77]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UG0Dp-0006LK-Ut for pgsql-jdbc@postgresql.org; Thu, 14 Mar 2013 04:57:03 +0000 Received: from mail-c232.authsmtp.com (mail-c232.authsmtp.com [62.13.128.232]) by punt7.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id r2E4usNl014050; Thu, 14 Mar 2013 04:56:54 GMT Received: from ayaki.localdomain (124-169-247-22.dyn.iinet.net.au [124.169.247.22]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id r2E4ukrh064511 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 14 Mar 2013 04:56:51 GMT Message-ID: <5141588D.9030405@2ndquadrant.com> Date: Thu, 14 Mar 2013 12:56:45 +0800 From: Craig Ringer Organization: 2nd Quadrant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3 MIME-Version: 1.0 To: Kevin Wooten CC: "pgsql-jdbc@postgresql.org" Subject: Re: A new JDBC driver... References: In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: multipart/alternative; boundary="------------060409040203060600080301" X-Server-Quench: 9645eaaf-8c63-11e2-b10b-0025903375e2 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZeVg0b BQteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFaQFbYFhD HGQLWldEUFl7XGV/ bggfbAdZfEtIVhto VE9XQFBNFgBqBAMA SFwcJx03LEceeHh0 YEdjEHFfVEx6O097 RksBRDxQeG8zbmMC UUENdR4GcQMYYx9F aFV2VHAOZmBSZDQC El17DBIdFx5qYA0d RAwSZXA+a21DEiQ9 WR0YW3NpdQAA X-Authentic-SMTP: 61633235383639.1019:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 124.169.247.22/2525 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Pg-Spam-Score: -2.6 (--) 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 This is a multi-part message in MIME format. --------------060409040203060600080301 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 03/12/2013 09:19 AM, Kevin Wooten wrote: > > * Asynchronous I/O engine provided by Netty > * All connections share a single group of worker threads That's going to cause serious issues on Java EE, especially when unloading applications. Since you're on JDBC4 you can have init and cleanup functions to manage the thread pool, but these are vital. I asked about this re PgJDBC quite some time ago and got some good information that's summarized here: http://stackoverflow.com/q/8514725/398670 Failure to properly shut the thread pool down when a servlet or application is unloaded will cause classloader leaks, tending to lead to PermGenSpace exhaustion errors and other problems. The driver will probably need application-server-specific integration hooks too. As for the "multiple JARs" converns, it's trivial to bundle dependencies inside the JDBC driver jar. However, this can cause issues if there's an incompatible version of the same library elsewhere on the classpath. It's OK if you're on a modern application server like JBoss AS 7 that isolates classloader chains, but it can be a real problem on older platforms and standalone applications. For this reason both a rollup version of the jar and a version without bundled libraries would probably be needed, but this is trivial to produce from Maven. Overall I think this is an intriguing idea, whether it proves to be an ideas testbed or something that becomes appealing to adopt more seriously. Congratulations on tackling it. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services --------------060409040203060600080301 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 7bit
On 03/12/2013 09:19 AM, Kevin Wooten wrote:

* Asynchronous I/O engine provided by Netty
* All connections share a single group of worker threads
That's going to cause serious issues on Java EE, especially when unloading applications. Since you're on JDBC4 you can have init and cleanup functions to manage the thread pool, but these are vital. I asked about this re PgJDBC quite some time ago and got some good information that's summarized here:

http://stackoverflow.com/q/8514725/398670

Failure to properly shut the thread pool down when a servlet or application is unloaded will cause classloader leaks, tending to lead to PermGenSpace exhaustion errors and other problems. The driver will probably need application-server-specific integration hooks too.

As for the "multiple JARs" converns, it's trivial to bundle dependencies inside the JDBC driver jar. However, this can cause issues if there's an incompatible version of the same library elsewhere on the classpath. It's OK if you're on a modern application server like JBoss AS 7 that isolates classloader chains, but it can be a real problem on older platforms and standalone applications. For this reason both a rollup version of the jar and a version without bundled libraries would probably be needed, but this is trivial to produce from Maven.

Overall I think this is an intriguing idea, whether it proves to be an ideas testbed or something that becomes appealing to adopt more seriously. Congratulations on tackling it.

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services
--------------060409040203060600080301--