Re: [ZODB-Dev] Notification in client app when object changed?

2007-01-25 Thread Dieter Maurer
David Gould wrote at 2007-1-25 09:05 +1000:
>I'm working on a system where several client apps connect to a ZEO server. 
> When an object is changed (via commit) I'd like all the clients to be 
> notified so that their gui's can be updated automatically. A callback or some 
> other hook that is called in client app would be great.

ZEO informs it clients when an object changed.

However, by default, these notifications are kept internal to the ZODB.
There is no hook to inform the application about it.

You would need to customize "ZODB.DB.invalidate" to implement such
a hook.



-- 
Dieter
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] Notification in client app when object changed?

2007-01-25 Thread Christian Theune
Am Donnerstag, den 25.01.2007, 09:05 +1000 schrieb David Gould:
> Hi,
> I'm working on a system where several client apps connect to a ZEO
> server. When an object is changed (via commit) I'd like all the
> clients to be notified so that their gui's can be updated
> automatically. A callback or some other hook that is called in client
> app would be great.
>  
> Any suggestions for implementing this type of functionality? Is it
> possible to be notified on specific object attribute changes, e.g.
> user.firstName, or is it per entire object?

The ZEO protocol sends an invalidation message to all clients when an
object changes. However, you only get the information which object
changed. Your application has to implement a higher-level mechanism to
find out what changed and what it means to your application.

Christian

-- 
gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev