[Zope] External Methods and Authentication error
Jonathan
dev101 at magma.ca
Thu Mar 8 14:11:07 EST 2007
----- Original Message -----
From: "Sascha Welter" <zopelist at betabug.ch>
To: <zope at zope.org>
Sent: Thursday, March 08, 2007 2:01 PM
Subject: Re: [Zope] External Methods and Authentication error
> (Thu, Mar 08, 2007 at 09:27:50AM -0500) Jonathan wrote/schrieb/egrapse:
>> I have an external method that contains:
>>
>> threadFolder = self.unrestrictedTraverse(topFolder + forumId +
>> '/' +
>> threadId, None)
>> threadFolder.manage_changeProperties({'viewCount':
>> threadFolder.viewCount+1})
>
> Jonathan,
>
> regardless of your error, I hope you understand that it looks like
> you are trying to do something slightly foolish here. Incrementing a
> property counter with every page view on an object in the ZODB will
> get the size of your Data.fs file up much, much faster than normally
> expected. Also you might get a lot of conflict errors.
>
> There is a "counter" product somewhere to be found (on zope.org IIRC)
> that does this stuff in a much better way. The proper way is of course
> to use the information in apache log files.
The counter must be real-time (ie. live), everytime someone views a
particular object the view count for that specific object must be
incremented and immediately displayed, therefore use of apache logs is not
appropriate for this particular situation. Also, the view counts must be
persistant (ie. simply updating a variable stored in RAM will not work).
If there is an alternative approach I would really like to know about it!
Thanks,
Jonathan
More information about the Zope
mailing list