[Twisted-Python] Inheriting from both pb.Cacheable and pb.RemoteCache?

Thomas Vander Stichele thomas at apestaart.org
Wed Jan 19 03:16:54 MST 2005


Hi,


> In the PB howto, it mentions that it's typical and fine to get bidirectional 
> synchronization between objects by inheriting from both pb.Copyable and 
> pb.RemoteCopy. Is the case the same when it comes to Cacheable?

I've wondered about it too, and after thinking about it I decided it was
a bad idea.  In the copy case (which works fine) you get a one-time copy
through serialization when doing remote methods.  In the Cacheable case
though, objects get changed on the other side due to changes on the one
side.

So in practice, what does that mean when side A changes the same object
as side B ? What do you do with conflicting changes ? It seems to me you
have no predictable way of resolving clashing changes.  So I ended up
not wanting to deal with those situations and worked around my need for
this.

Now, I do think in practice it will probably work, just not reliably and
very hard to debug when it doesn't do what you expected.  Write a small
test app and give it a try.

Thomas


Dave/Dina : future TV today ! - http://www.davedina.org/
<-*- thomas (dot) apestaart (dot) org -*->
The girl that I could never hurt
had to go and lose all that power over me
and I claimed victory
<-*- thomas (at) apestaart (dot) org -*->
URGent, best radio on the net - 24/7 ! - http://urgent.fm/







More information about the Twisted-Python mailing list