[ZODB-Dev] I need disconnected mode functionality,
but i get ClientDisconnected exception
Dieter Maurer
dieter at handshake.de
Tue Jan 31 15:10:11 EST 2006
Mihai Ilinca wrote at 2006-1-30 20:11 +0200:
> ...
>I want to have a ClientStorage that would work in both connected and
>disconnected (to zeo-server) mode. When zeo-server is not up (or reachable),
>I would like ClientStorage to use a local cache. Is that possible with ZEO?
>
>Right now I instanciate ClientStorage with
>ClientStorage(
> zeoServerAddress,
> name = 'name',
> client = 'client',
> var = 'path',
> wait = False
> )
>When I try to access the attributes of the root persistent object (instance of
>PersistentMapping) I get a ClientDisconnected exception:
In principle, it should be possible (though I did not try it myself).
Of course, as soon as you modify any object or have a cache
miss on reading, the ZEO server will be contacted
and you get a "ClientDisconnect" when this is impossible.
"ClientStorage" does not support complete autonomous work
(purly with a cache). All writes need to go directly to ZEO.
--
Dieter
More information about the ZODB-Dev
mailing list