From: | Kris Jurka <books(at)ejurka(dot)com> |
---|---|
To: | pgsql(at)toddb(dot)mailshell(dot)com |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: non-polling LISTEN |
Date: | 2005-08-19 17:24:01 |
Message-ID: | Pine.BSO.4.62.0508191213220.24486@leary.csoft.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On Fri, 19 Aug 2005 pgsql(at)toddb(dot)mailshell(dot)com wrote:
> I would like to be able to "watch" a table and be informed when a row is
> updated. I have seen the LISTEN/NOTIFY option, but it appears to be a
> polling arrangement. I will have 200 or so individual programs polling
> at 10 times a second, which seems like a lot of overhead. I would
> instead like to have each program perform something like a select(), and
> just block until the table updates. Is there are way to do this via the
> JDBC? (Our application is in Java)
The cvs version of the driver allows polling on the client side only that
doesn't require hitting the database. So your code polls the JDBC driver,
but the driver doesn't need to actually poll the database. A true
select() type solution would require moving to java.nio, but that is still
a ways away as we want to retain support for older JDKs.
http://archives.postgresql.org/pgsql-jdbc/2005-04/threads.php#00054
Kris Jurka
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2005-08-19 17:25:00 | Re: COPY support survey |
Previous Message | Kris Jurka | 2005-08-19 17:10:30 | Re: COPY support survey |