[Zope-ZEO] ZEO Readme

Jim Fulton jim@digicool.com
Tue, 26 Sep 2000 18:49:04 -0400


Nuno Simoes wrote:
> 
>         Hi.
> 
>         I've spended some time around ZEO, trying to put two FileStorages
> working together, one in read_only mode. Ok, some things on the README
> file just don't help:
> 
> "
> import ZODB.FileStorage
> Storage=FileStorage('/stores/fs1.fs', read_only=1)
> "
> 
> ...should be...
> 
> "
> import ZODB.FileStorage
> Storage=ZODB.FileStorage.FileStorage('/stores/fs1.fs', read_only=1)
> "

Yup. I'll fix this. Thanks.

>         - It seems to be impossible to use the declaration of two FileStorages
> in one *.py file. You have to write to *.py files, one for each *.fs,
> like this:
> 
> [store.py]
> import ZODB.FileStorage
> News=ZODB.FileStorage.FileStorage('/usr/local/zope/Zope-2.2.2-linux2-x86-server/var/News.fs',read_only=1)
> 
> [data.py]
> import ZODB.FileStorage
> Dados=ZODB.FileStorage.FileStorage('/usr/local/zope/Zope-2.2.2-linux2-x86-server/var/Data.fs')
> 
> $./start_zeo -SDados=./data:Dados -SNews=./store:News

No, you can put them in the same module, as in:

  [data.py]
  import ZODB.FileStorage
  Dados=ZODB.FileStorage.FileStorage(
  '/usr/local/zope/Zope-2.2.2-linux2-x86-server/var/Data.fs'
  )
  News=ZODB.FileStorage.FileStorage(
  '/usr/local/zope/Zope-2.2.2-linux2-x86-server/var/News.fs',
  read_only=1)


  $./start_zeo -SDados=./data:Dados -SNews=./data:News

Note that there was a bug in ZEO 0.2.3 (and earlier).
This was fixed in 0.4.0.
 
> [custom_zodb.py]
> import ZEO.ClientStorage
> Storage=ZEO.ClientStorage.ClientStorage(('192.168.0.128',2000),name="ZEO
> Storage", storage='News')

I'm not sure what you are trying to say here.
 
Jim

--
Jim Fulton           mailto:jim@digicool.com
Technical Director   (888) 344-4332              Python Powered!
Digital Creations    http://www.digicool.com     http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.