[Zope] MappingStorage for ZEO Sessions?

Dieter Maurer dieter at handshake.de
Wed May 5 15:23:00 EDT 2004


george donnelly wrote at 2004-5-4 17:09 -0500:
>I have a 4 client ZEO cluster that I am setting up a central sessions
>storage for. I'm wondering if someone can give me a little feedback on
>what I have done, eg i have a few questions:
>
>1. am i doing this right?

Does not look bad.

Although we use the load balancer to always send the user
to the same Zope instance. This way, a centralization
of session info is not necessary.

>2. where does the mapping storage store itself on the filesystem? as
>part of the Data.fs of the root-mounted filestorage?

I probably would try to keep the session info in RAM.

They will get lost when ZEO is restarted -- but that
happens (for us) only extremely rarely.

I do not know whether ZEO supports such a RAM based
storage already...

>3.  If i add a transient object container a level below the zope root,
>will its data also get stored in the Mapping Storage?

Learn about "mounting" (formerly known as "DBTab").

You can mount different storages at different points in
your Zope hierarchy.

I do not know, what you mean by "Mapping Storage".
But, if this is a supported ZODB storage, you
should be able to mount one whereever you want.

You must be careful, however: you cannot use
different connections to the *same* storage in the same
transaction (this leads to deadlock).

  Use multiple mount points when you want to mount the same
  storage in different locations.


> ...
>I am using MappingStorage and it is setup in zeo.conf like this:
> ...
>and later this:
>
>
>2004-05-04T14:46:13 INFO(0) zrpc-conn:192.168.1.4:60202 zeoLoad() raised
>exception: '\x00\x00\x00\x00\x00\x00\x00\x00'
>Traceback (most recent call last):
>  File "/usr/local/zope/270/lib/python/ZEO/zrpc/connection.py", line
>264, in handle_request
>    ret = meth(*args)
>  File "/usr/local/zope/270/lib/python/ZEO/StorageServer.py", line 248,
>in zeoLoad
>    p, s = self.storage.load(oid, '')
>  File "/usr/local/zope/270/lib/python/ZODB/MappingStorage.py", line 56,
>in load
>    p = self._index[oid]
>KeyError: '\x00\x00\x00\x00\x00\x00\x00\x00'

This is normal. Your "mappingstorage" is still empty (it lacks the
root). This causes the above error.
When "ZODB.DB" gets this error, it creates the root object.

-- 
Dieter



More information about the Zope mailing list