Re: NOTIFY in asynchronous mode

From: Tobias Oberstein <tobias(dot)oberstein(at)tavendo(dot)de>
To: Jan Urbański <wulczer(at)wulczer(dot)org>
Cc: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>, "psycopg(at)postgresql(dot)org" <psycopg(at)postgresql(dot)org>
Subject: Re: NOTIFY in asynchronous mode
Date: 2011-11-05 12:37:39
Message-ID: 634914A010D0B943A035D226786325D42D0C0CE428@EXVMBX020-12.exch020.serverdata.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

> I think that's a reasonably simple API and one that allows you to do anything
> you want without introducing some extra interfaces that notify observers
> have to implement, just requiring that they are callable.

Yeah, thats fine. So

+ all observers registered on a connection would get notified when a notification
on that connection arrives.

+ a dispatching scheme based on channel can be built on top of above

+ the LISTEN/UNLISTEN is orthogonal to observer registration

+ any callable which takes a first positional argument of type "notify" can be used

+ the whole interface for above is Connection.addNotifyObserver/removeNotifyObserver

, right?

In response to

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2011-11-06 10:42:34 Re: NOTIFY in asynchronous mode
Previous Message Jan Urbański 2011-11-05 11:51:46 Re: NOTIFY in asynchronous mode