[Zope3-Users] Ahh, counters... Best practice?

Benji York benji at zope.com
Tue Aug 14 17:21:52 EDT 2007


Jeff Shell wrote:
> We're working on something where we need to allow site visitors to
> rate items. It's the basic star-rating thing. We want to keep a count
> of the number of votes along with the current value.

At work we've been contemplating an approach for use in some similar 
situations we want to address.

In broad strokes: keep the updated value in memory, write the value to 
the database "periodically" (for whatever value of "periodically" is 
appropriate for the data).

This should work well when the value changes often and loosing the most 
recent updates to the value isn't catastrophic.
-- 
Benji York
Senior Software Engineer
Zope Corporation


More information about the Zope3-users mailing list