From: Oliver Jowett <oliver@opencloud.com>
To: Thomas Hallgren <thhal@mailblocks.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [HACKERS] Binary Cursors, and the COPY command
Date: Wed, 28 Jul 2004 10:19:03 +1200
Message-ID: <4106D4D7.6070902@opencloud.com> (raw)
In-Reply-To: <thhal-0R+vhAVuAUNsmTOeWEFk4eWMUjvkd03@mailblocks.com>
References: <10519.64.119.142.34.1090863707.squirrel@mail.mohawksoft.com>
<410574F9.9020103@opencloud.com>
<ce4t7l$pas$2@sea.gmane.org>
<4105FF43.40508@opencloud.com>
<ce587j$ga1$1@sea.gmane.org>
<410628B9.2080800@opencloud.com>
<41063C77.6050305@mailblocks.com>
<thhal-0Q9bhAYV/UNsnPJAzxj6lUGXE5P7Ium@mailblocks.com>
<41063FFE.8030400@opencloud.com>
<4106517C.2090802@mailblocks.com>
<thhal-0R+vhAVuAUNsmTOeWEFk4eWMUjvkd03@mailblocks.com>
Thomas Hallgren wrote:
> I'm the author of PL/Java. It uses its own JDBC driver on top of SPI.
> The main reason for thas is that I don't want the overhead of streaming
> data and flipping byte order when everything is readily available in
> memory. When "client" and "server" resides in the same process the
> overhead is measurable. By using java.nio in your JDBC, I beleive it
> would be possible to not just use native byte ordering, but perhaps also
> to create a nice abstraction allowing direct access to structures in
> memory rather than streaming data, thus obliviate the need for my own
> driver. And PL/Java will never run on Java 1.3 or older :-)
>
> Do you have any opinion on that?
This is a *lot* of work. There are bigger issues to deal with than the
use of NIO -- lots of the higher-level JDBC code makes assumptions about
the details of the protocol it is speaking. I've made some inroads on
that front with the V3 protocol rewrite I did recently but there will
still be a lot more work in that area.
That said, I can see that it might work with "SPI within the same
process" as a new underlying "protocol". That could use NIO or whatever
you want, and conditionally build that code only when 1.4 + the SPI
interface is available. The query/parameter abstraction that's currently
in place is intended to give the protocol flexibility about how it
represents the data (although it is pretty basic at the moment) so I
don't think it'd be necessary to have NIO in the protocol-independent
parts of the driver.
Anyway, good luck :)
-O
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: oliver@opencloud.com, thhal@mailblocks.com
Subject: Re: [HACKERS] Binary Cursors, and the COPY command
In-Reply-To: <4106D4D7.6070902@opencloud.com>
References: <10519.64.119.142.34.1090863707.squirrel@mail.mohawksoft.com> <410574F9.9020103@opencloud.com> <ce4t7l$pas$2@sea.gmane.org> <4105FF43.40508@opencloud.com> <ce587j$ga1$1@sea.gmane.org> <410628B9.2080800@opencloud.com> <41063C77.6050305@mailblocks.com> <thhal-0Q9bhAYV/UNsnPJAzxj6lUGXE5P7Ium@mailblocks.com> <41063FFE.8030400@opencloud.com> <4106517C.2090802@mailblocks.com> <thhal-0R+vhAVuAUNsmTOeWEFk4eWMUjvkd03@mailblocks.com> <4106D4D7.6070902@opencloud.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