[Zope] Interbase / Cacheing - A thought

Ian Sparks Ian Sparks" <isparks@wmute.u-net.com
Thu, 1 Jun 2000 12:03:07 +0100


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".

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.

- Ian Sparks.