[ZODB-Dev] Read only ZEO hack

Tim Hoffman timhoffman@cams.wa.gov.au
Wed, 03 Oct 2001 23:22:55 +0800


Hi

I have been playing around with ZEO to allow me to have a readonly and 
read/write zeo clients.

I wanted this to be controlled by the ZSS (storage server)

Why>

Well in some cases I want a readonly version of the ZEO server in the 
DMZ and publishing ZEO in behind the firewall.

So I have whipped up something. It consists of diff for 
ZEO/StorageServer.py, a new Class called ZeoConf, a zeo_conf.py file
You can specify on a per client/storage basis either 'rw' read write,
'ro' readonly or 'na' - no access is available. The last will cause a 
client to fail to connect or not be able to access a specific named storage.

It has not had much testing, and I am not sure if I have really gone
about it in the right way. This is a quick hack, lot's of other things
could be done to it. (lots of redundant methods are in ZeoConf from
my initial testing)

I still need to do lots of testing with CMF (ie members can't login
when zeo is read oly), and it looks like some work will
need to be done, with exceptions.

If you are interested you can get it from 
http://www.zope.org/Members/smog/index_html

This is all based on Zope 2.4.1, ZEO 1.0b4 and python 2.1 ) (i have 
tried it linux and solaris)

See ya

Tim Hoffman






Tim Hoffman
Zute Pty Ltd
mobile: 0411 068888
fax:    +61 8 6210 1883
email:  timh@zute.net