Re: implementing asynchronous notifications

Поиск
Список
Период
Сортировка
От Andras Kadinger
Тема Re: implementing asynchronous notifications
Дата
Msg-id Pine.LNX.4.44.0504110519590.13042-200000@ns.surfnonstop.com
обсуждение исходный текст
Ответ на Re: implementing asynchronous notifications  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: implementing asynchronous notifications  (Andras Kadinger <bandit@surfnonstop.com>)
Re: implementing asynchronous notifications  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
On Sun, 10 Apr 2005, Oliver Jowett wrote:

> It'll be tricky to do this from a single codebase as the NIO changes
> would need to reach right down to the underlying protocol stream.. it
> seems hard to localize the changes.

Okay, then I implemented this using Socket.getInputStream().available()
calls.

Proof of concept attached.

PGConnection.getNotifies() now processes peding Async Notifies first - no
need to send polling queries to the server anymore. The result is zero
network traffic in the idle case.

Any comments?

I am unclear as to how to handle possible protocol errors (e.g. when what
we end up reading from the connection is not an 'A'sync Notify).
Theoretically, in a working connection this should not happen though.

Вложения

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: implementing asynchronous notifications
Следующее
От: Andras Kadinger
Дата:
Сообщение: Re: implementing asynchronous notifications