[Zope] Centralized sessions with ZEO

Sours, Kevin KSours at carsdirect.com
Mon Mar 10 17:55:00 EDT 2008

I apologize if this has been asked ad nauseam.  I've uncovered enough
information online to suggest that it has, but too little to get any
kind of definitive answer.  My problem is that I am running a number of
zope instances against a zeo instance.  I would like to store the
session data in the ZEO instance so that the session data is shared
between the different zope instances.  The question is how best to do

What I've settled on is the approach given at
http://www.zopelabs.com/cookbook/1061234337.  This appears to work fine,
however I don't really like the idea of using an undoable store and
having to constantly pack it.  I definitely don't need persistent data
(if the sessions go away when I restart ZEO so be it).  I tried the same
approach using a tempstorage instead of filestorage.  This works up
until ZEO is stopped and started, at which point the transient object
container in the temporary storage disappears (which makes sense, but is
a little inconvenient).

I also tried the approach at
http://longsleep.org/1/howto/sharesessionwithzeo. This is absolutely
perfect for what I want to do save for the fact that it doesn't work.
No matter what I tried with it, the sessions don't get shared.  In fact,
it doesn't look like the database on ZEO get recognized at all.  When I
go to add a mount point it tells me that there is something in the way
of /temp_folder (presumably the autocreated temporary folder object for
the default sessions).  What I find particularly odd is that this
appears to be the case for anything configured to mount at /temp_folder
- including the temporary storage configured as part of the default
zope.conf file.  Changing that part of the default config or removing it
entirely doesn't appear to have any impact on how zope runs.

I feel like I'm missing something.  It seems like configuring the
sessions to use  tempstorage on the ZEO instance shouldn't be this hard.
I'm also confused by the seemingly spurious block in the zope.conf:
<zodb_db temporary>
    # Temporary storage database (for sessions)
      name temporary storage for sessioning
    mount-point /temp_folder
    container-class Products.TemporaryFolder.TemporaryContainer

I haven't been able to find much documentation on what the various
options for this block mean (particularly the container-class) member.

I should probably mention that I am running 2.8.7, which I realize is
more than a little out of date at this point.  I'm hoping that somebody
can fill me in a little or point me to some documentation I may have

Thanks in advance

More information about the Zope mailing list