[Zope] Counter and concurrent access

marc lindahl marc@bowery.com
Mon, 24 Sep 2001 11:51:08 -0400


> From: Luciano Ramalho <luciano@hiper.com.br>
> 
> Beware of implementing counters within ZODB! Anytime you change a
> property of a persistent object like a Folder or DTML Document, Zope
> stores a new version of that object in ZODB. This leads to Data.fs
> severe bloat!!! Use a relational database or some other Python-only
> persistence mechanism to store your counter.

Actually, for example, take a look at ThreadSafeCounter (part of ZopeGUD) -
it's an example of how to control persistence to avoid updating a counter
object for every tick.

Other than that, FSCounter works quite nicely...