Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 42710 invoked from network); 15 Jun 2009 06:31:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Jun 2009 06:31:18 -0000 Received: (qmail 76852 invoked by uid 500); 15 Jun 2009 06:31:28 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 76773 invoked by uid 500); 15 Jun 2009 06:31:28 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 76763 invoked by uid 99); 15 Jun 2009 06:31:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jun 2009 06:31:28 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bchesneau@gmail.com designates 209.85.220.211 as permitted sender) Received: from [209.85.220.211] (HELO mail-fx0-f211.google.com) (209.85.220.211) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jun 2009 06:31:19 +0000 Received: by fxm7 with SMTP id 7so4602610fxm.11 for ; Sun, 14 Jun 2009 23:30:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=vcWK1y3W3rmKpiA5iR9/XpWwUAjgZTZK+34yuSEYEbs=; b=tiRXxVc/W6Yr9+gcp+06+vfh9JKzRWS6Ouq3PejxCou14s0ByzD8QI2uylKObhoJuS nJsuNytIS4t93W4lksBrO8NE9UheS126RODY81TxfDYU6due4g4lPCdiW9ji5IJvFLWj wTUcz+ZOoui5PUBtmO16/++u/wE4DyGMEwq8A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=kMzozEomYKs57pQVmAI0ERiwJYb1PrBc+0S89m6kOo3YiKL0OUvFXiTlBbXN1Vzz06 fEyCkImHu3a+g9H0ZdY/yed9fDOw8VKGjGQFjZ4NNluN/7vU6Eijg7GZ+hVtWzSp09Tg jDRr8Oz/8IosdbpNzIF32hJRNc6fu1lFyrf8E= MIME-Version: 1.0 Received: by 10.86.3.20 with SMTP id 20mr2183166fgc.16.1245047458817; Sun, 14 Jun 2009 23:30:58 -0700 (PDT) In-Reply-To: References: <20090611195504.GB20617@translab.its.uci.edu> <59801549-09E3-4903-BA9A-0D0C35AC65BB@apache.org> Date: Mon, 15 Jun 2009 08:30:58 +0200 Message-ID: Subject: Re: calulate doc popularity with couchdb map/reduce From: Benoit Chesneau To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 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? =A0It >>> 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=EEt