From: Craig Ringer <craig@2ndquadrant.com>
To: Scott Harrington <scotth01@sns-usa.com>
To: Mikko Tiihonen <Mikko.Tiihonen@nitorcreations.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: [JDBC] Pipelining executions to postgresql server
Date: Tue, 04 Nov 2014 15:35:32 +0800
Message-ID: <545881C4.10008@2ndquadrant.com> (raw)
In-Reply-To: <alpine.WNT.2.11.1411021633360.4832@sitra>
References: <1414850643686.34687@nitorcreations.com>
<20141101173116.GR13584@awork2.anarazel.de>
<1414930308808.49160@nitorcreations.com>
<20141102122320.GB28295@alap3.anarazel.de>
<1414934833900.88748@nitorcreations.com>
<alpine.WNT.2.11.1411021633360.4832@sitra>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 11/03/2014 07:05 AM, Scott Harrington wrote:
> This avoids the need for a Future, and avoids the client having to
> loop/sleep until done.
A Future is the logical way to represent an asynchronous operation in
Java. Why implement something else that doesn't fit into existing
libraries and tools when there's already a standard interface?
If you're breaking outside the stock JDBC model and thinking
asynchronously, then using the existing Java APIs for asynchrony makes
sense to me.
In terms of looping until done ... what we really need is a reliably
non-blocking PGConnection.consumeInput() so apps can call that in their
main loops, or via a helper thread. Then we'd be able to add async
notification callbacks too. To do that we need to make PGstream use a
java.nio.Channel instead of a java.net.socket .
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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: craig@2ndquadrant.com, scotth01@sns-usa.com, Mikko.Tiihonen@nitorcreations.com, pgsql-hackers@postgresql.org
Subject: Re: [JDBC] Pipelining executions to postgresql server
In-Reply-To: <545881C4.10008@2ndquadrant.com>
References: <1414850643686.34687@nitorcreations.com> <20141101173116.GR13584@awork2.anarazel.de> <1414930308808.49160@nitorcreations.com> <20141102122320.GB28295@alap3.anarazel.de> <1414934833900.88748@nitorcreations.com> <alpine.WNT.2.11.1411021633360.4832@sitra> <545881C4.10008@2ndquadrant.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