incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zachary Zolton <zachary.zol...@gmail.com>
Subject Re: Optimal counter implementation?
Date Thu, 12 May 2011 14:44:52 GMT
So, you could increment a counter—using whatever datastore seems
appropriate to you—and then also store a log document in a CouchDB
database for future analysis. As long as you don't depend on reading
from that  log database for any of the website's functionality, that
may mitigate concerns for having to frequently compact it.

On Wed, May 11, 2011 at 7:37 PM, He Shiming <heshiming@gmail.com> wrote:
> On Wed, May 11, 2011 at 11:12 PM, Zachary Zolton
> <zachary.zolton@gmail.com> wrote:
>> As long as your considering using another datastore, you should consider Redis.
>>
>> If you're just maintaining count statistics:
>> http://redis.io/commands/incr
>>
>
> Thanks. I'm considering CouchDB because I'm familiar with the
> document/map-reduce concept. I'm not sure how this counter data will
> be used in the future. So I tend to keep a raw log of it. Map-reduce
> will allow me to query about just any field.
>
> I used redis for session store, which is strictly a key-value pair.
> Redis' incr looks simple. But what if I would like to store raw log,
> with time, subject and target? And later on how do I manage to query
> by these fields? Sorry for off-topic. I'll redirect this question to
> the redis community.
>
> --
> Best regards,
> He Shiming
>

Mime
View raw message