pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Markus Schaber <schabios@logi-track.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [BUGS] BUG #1347: Bulk Import stopps after a while (
Date: Wed, 15 Dec 2004 10:04:20 +1300
Message-ID: <41BF5554.4040309@opencloud.com> (raw)
In-Reply-To: <20041214150658.0598b277@kingfisher.intern.logi-track.com>
References: <20041213072018.2B6C2738805@www.postgresql.com>
	<Pine.BSO.4.56.0412130234430.26362@leary.csoft.net>
	<25966.1102958463@sss.pgh.pa.us>
	<41BE0268.1060602@opencloud.com>
	<20041214150658.0598b277@kingfisher.intern.logi-track.com>

Markus Schaber wrote:
> Hi, Oliver,
> 
> On Tue, 14 Dec 2004 09:58:16 +1300
> Oliver Jowett <oliver@opencloud.com> wrote:
> 
> 
>>Also, it's never going to be 100% without a separate thread, as the 
>>server can spontaneously generate output (e.g. because of NOTIFY) 
>>regardless of how careful we are with our queries.

I think my analysis here was wrong. It doesn't matter if the server 
unexpectedly fills up its output pipe so long as the driver doesn't do 
the same.

> Sadly, we cannot abandon compatibility with older JDK releases, this
> would allow us to use the new asynchroneous I/O interfaces.

Hm, is async I/O standardized yet? I thought JSR203 ("more NIO") covered 
this, but it's still in the early stages according to jcp.org.

> Async I/O is a great tool when in the right hands, you might google for
> Felix von Leitner and his "fnord" and "gatling" servers that even beat
> the kernel based khttpd. 

Current NIO isn't async I/O, but it's still fairly good (use at least 
1.4.2_06, though, or you can have GC problems when collecting direct 
buffers). We have written several resource adaptors that use it and they 
perform well. The main win is that you don't need N threads for N 
clients. That can't really be applied to the JDBC driver easily as the 
API means that the client controls most of the threading, but the 
ability to get at non-blocking primitives would still be useful.

I wonder if we can have some threads-or-NIO abstraction .. the main 
thing we need is the ability to call out to some other code to do reads 
either when we discover our writes will block (NIO) or when we have data 
ready to read (threads). We then read and process messages until we 
would block (NIO) or we *do* block (threads).

I doubt I'll have time to look at this in the near future though.

-O



view thread (17+ messages)  latest in thread

Message-ID: <41BF5554.4040309@opencloud.com>
Permalink:  ../41BF5554.4040309@opencloud.com/
Also on:    postgresql.org/message-id/41BF5554.4040309@opencloud.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: oliver@opencloud.com, schabios@logi-track.com
  Subject: Re: [BUGS] BUG #1347: Bulk Import stopps after a while (
  In-Reply-To: <41BF5554.4040309@opencloud.com>
  References: <20041213072018.2B6C2738805@www.postgresql.com> <Pine.BSO.4.56.0412130234430.26362@leary.csoft.net> <25966.1102958463@sss.pgh.pa.us> <41BE0268.1060602@opencloud.com> <20041214150658.0598b277@kingfisher.intern.logi-track.com> <41BF5554.4040309@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