[ZODB-Dev] Server Notification?
Jim Fulton
jim at zope.com
Sun Oct 9 10:37:44 EDT 2005
Chris Spencer wrote:
> I'm writing a program to graphically represent certain objects on a ZEO
> server. Is there a way to make the server execute code on the client to
> notify it of changes, or does the client have to continually poll all
> watches objects for changes?
There is an invalidation protocol for notifying connections to invalidate
objects that have changed. (This has nothing to do with ZEO.) All
connections other than the connection initiating the change receive
an invalidation message when a change to an object is committed.
There currently isn't a way for application code to be called when
these message are sent, but I've often thought of providing a way.
When a non-ghost object is invalidated, it's _p_invalidate method is
called. You could conceivably override this method, for example to
reload state and update a display.
> Also, is any information about client connections accessible by clients
> themselves?
No.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the ZODB-Dev
mailing list