[Zope] Interbase / Cacheing - A thought

Hannu Krosing hannu@tm.ee
Thu, 01 Jun 2000 13:28:28 +0300


Ian Sparks wrote:
> 
> Had a thought that I wanted to share.
> 
> Interbase has a feature known as "event alerts". In a trigger you can post
> "events" which are just fixed data strings e.g. "DataAdded" or
> "Insert_tblUsers".

PostgreSQL has them too.

It's not (afaik) supported by DB-API, but could be used in a DA that talks 
to some lower level API.

> A client database connection can register to listen to these events.
> 
> I don't know if any Zopeish Interbase access method supports this (ODBC
> doesn't to my knowledge) but it would be incredibly useful for synching
> cached database objects. Zope could hold a representation of the table data
> in cached objects for quick access. Each object could have one or more
> "event" methods which related to a database event. When the database adaptor
> received an event message from Interbase it could inform all objects with a
> matching event method (these methods would refresh their cached data with
> current values from the database).
> 
> In this way database and Zope cache could be synced *without* having to poll
> the database at an interval. In all, a very efficient mechanism.
>
> Just an idea I wanted to put out there.

Thanks for getting it out.

I have been contemplating the same for PostgreSQL but have been too lazy to do 
it myself ;)

------------------
Hannu