[Zope] MappingStorage for ZEO Sessions?

Matt Hamilton matth at netsight.co.uk
Thu May 6 03:50:34 EDT 2004


george donnelly wrote:

>I feel like tying a user to a one instance partially defeats the purpose
>of a cluster i guess. if that instance goes down the user is
>inconvenienced.
>  
>
George,
  We do a similar thing this our ZEO clusters.  Instead of 
MappingStorage we use TemporaryStorage.  The revelent bits from our configs:

zeo.conf:
%import DirectoryStorage
# Main DirectoryStorage database
<directorystorage main>
   path $INSTANCE/var/zodb
   read-only off
</directorystorage>

%import tempstorage
<temporarystorage temp>
   name temporary storage for sessioning
</temporarystorage>


zope.conf:
<zodb_db main>
   mount-point /
   <zeoclient>
     server 9999
     storage main
     name zeostorage
     cache-size 1000000000
     client client1
     var $INSTANCE/var
   </zeoclient>
</zodb_db>

<zodb_db temporary>
   <zeoclient>
     server 9999
     storage temp
     name zeostorage
     var $INSTANCE/var
   </zeoclient>
   mount-point /temp_folder
   container-class Products.TemporaryFolder.TemporaryContainer
</zodb_db>


*Note* This will not work out of the box in 2.7.0, as there is a method 
missing from TemporaryStorage.py.  I think it is fixed in CVS, if not 
add the following method.

    def lastTransaction(self):
        """Return transaction id for last committed transaction"""
        return self._ltid


-Matt

-- 
Matt Hamilton                                       matth at netsight.co.uk
Netsight Internet Solutions, Ltd.        Business Vision on the Internet
http://www.netsight.co.uk                             +44 (0)117 9090901
Web Design | Zope/Plone Development & Consulting | Co-location | Hosting



More information about the Zope mailing list