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 <[email protected]> wrote: > On Wed, May 11, 2011 at 11:12 PM, Zachary Zolton > <[email protected]> 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 >
