couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <>
Subject Re: calulate doc popularity with couchdb map/reduce
Date Mon, 15 Jun 2009 06:30:58 GMT
2009/6/14 Chris Anderson <>:
> On Sun, Jun 14, 2009 at 3:07 AM, Jan Lehnardt<> wrote:
>> On 11 Jun 2009, at 21:55, James Marca wrote:
>>> On Wed, Jun 10, 2009 at 04:25:13PM -0500, Zachary Zolton wrote:
>>>> So, another +1 for chainable map-reduce...? (-_^)
>>> And +1 from me too.
>>> I am completely ignorant of Erlang and the CouchDB internals, but why
>>> is map/reduce output (all the view docs I see in the directory as
>>> .whatever files) any different than regular CouchDB databases?  It
>>> seems logical that the same tools that apply to a CouchDB database
>>> should apply to view files as well, so one can map/reduce against view
>>> without having to manually convert it back from view results into
>>> another CouchDB database.
>> The fundamental problem is that a reduced result can no longer keep
>> track of which docs took part in creating this value. For incremental
>> updates (knowing what to recompute when only a single doc changed)
>> needs this.
> I wrote some Erlang code to copy a reduce query to another database
> for further sorting / viewing. I then realized it was not usable in a
> multi-node cluster so I abandoned the idea of putting it in CouchDB.
> Instead I plan to rewrite it in Ruby. It would seriously be about 6
> lines of code so I'll see what I can do.
Maybe this isn't the right method to do it but how Hadoop do ? Think
it's possible to chain map/reduce in it, isn't it ? In a real
map/reduce model you should be able to chain them. And I think it's
possible for grouped reduce since you send k/v .

Obviously making 4 HTTP calls to do display only one list of data
depending on the same key is too much. It's perfectly manageable in a
classic application but not for couchapps via ajax. Too much calls to
do it. obviously it can be done by an external or an internal handler,
but so why not having a way i couchdb to do it ?

- benoît

View raw message