Search Postgresql Archives

Re: Inter-app communication via DB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 19, 2008 at 11:46:42AM +0200, David wrote:

> > That will happen anyway, no matter what the message
> > transport is like. Apps will have to read state at startup
> > anyway, no ?
> 
> I have a small problem with this. If app1 wants to tell app2 to
> perform an expensive operation (which you don't want app2 to do each
> time it starts up), in the original pattern it could just set a
> boolean variable. Now it needs to both set a boolean variable (in case
> app2 isn't running at the moment) and use NOTIFY (for when it is),
> which seems a bit redundant.

You could add a trigger to the table with the boolean flag.
The trigger sends the NOTIFY all by itself. So when the app
is listening it gets the signal. When it isn't it will read
the flag at startup. All the other app does is set the flag.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux