[Zope] conflicts, sessions, and programming best practices guidelines

Dennis Allison allison at shasta.stanford.edu
Fri Nov 18 16:38:00 EST 2005


Thanks Dieter.  


On Fri, 18 Nov 2005, Dieter Maurer wrote:

> Dennis Allison wrote at 2005-11-15 14:54 -0800:
> >Has anyone prepared a set of best practice guidelines on the techniques to
> >use to minimize conflicts?
> 
>   *  Localize out into separate persistent objects attributes
>      with high write frequency.
> 
>      E.g. when you have a counter, put into its own
>      persistent object (you can use a "BTrees.Length.Length" object
>      for a counter).
> 
>   *  Implement "conflict resolution" for your high frequently
>      written persistent objects.
> 
>      Formerly, "TemporaryStorage" had only very limited
>      history information to support conflict resolution (which
>      limited the wholesome effect of conflict resolution).
>      Rumours say that this improved with Zope 2.8.
> 
>   *  Write only when you really change something.
> 
>      E.g. instead of "session[XXX] = sss" use
>      "if session[XXX] != sss: session[XXX] = sss"
>      (at least, if there is a high chance that "session" already
>      contains the correct value).
> 
> 
> 

-- 



More information about the Zope mailing list