From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | Scott Harrington <scotth01(at)sns-usa(dot)com>, Mikko Tiihonen <Mikko(dot)Tiihonen(at)nitorcreations(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: [JDBC] Pipelining executions to postgresql server |
Date: | 2014-11-04 07:35:32 |
Message-ID: | 545881C4.10008@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-jdbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2014-11-04 07:55:20 | Re: [HACKERS] Pipelining executions to postgresql server |
Previous Message | Craig Ringer | 2014-11-04 07:28:46 | Re: [HACKERS] Pipelining executions to postgresql server |
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2014-11-04 07:55:20 | Re: [HACKERS] Pipelining executions to postgresql server |
Previous Message | Craig Ringer | 2014-11-04 07:28:46 | Re: [HACKERS] Pipelining executions to postgresql server |