Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 99866 invoked from network); 6 Aug 2008 20:02:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Aug 2008 20:02:44 -0000 Received: (qmail 73915 invoked by uid 500); 6 Aug 2008 20:02:42 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 73890 invoked by uid 500); 6 Aug 2008 20:02:42 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 73879 invoked by uid 99); 6 Aug 2008 20:02:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2008 13:02:42 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jchris@gmail.com designates 74.125.44.152 as permitted sender) Received: from [74.125.44.152] (HELO yx-out-1718.google.com) (74.125.44.152) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2008 20:01:45 +0000 Received: by yx-out-1718.google.com with SMTP id 36so51255yxh.0 for ; Wed, 06 Aug 2008 13:01:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=gXxwBWgsYraZJrVo3TdmQX0OqvALDi95ylFwwXJvV9E=; b=ZU1LSgQr0eeysBtlj36TYBq98hgHQfE32tpTB3rK6kzJSunzCYoOm3vGVat29+ZgKb bgDUCBQSxuvh8vojFQeDxAJ9naC/mMfxLomxBYxc/2HaaLuhFXY7qGf/LaG40CUgwTFx TLBQD9Ud0fG10l1nKXq0BaM8AAnk749oJX+18= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=MbsEr3ZLo81Wm63KvF3B2F8IhXx4B9esIVQ1e+5ebnkvU282Id7uFCmMSVFYUWGO4W hOumhm1yvBYBxCajjkO89x3QUYUQu4/fQUnTlogcbtCvxBVYmunMcaep91WGmt+BE79K S2AGujCA8KxEalImnorEaVwbQ+IU2HxONQ6ro= Received: by 10.150.212.14 with SMTP id k14mr4003880ybg.35.1218052914827; Wed, 06 Aug 2008 13:01:54 -0700 (PDT) Received: by 10.151.44.19 with HTTP; Wed, 6 Aug 2008 13:01:54 -0700 (PDT) Message-ID: Date: Wed, 6 Aug 2008 13:01:54 -0700 From: "Chris Anderson" Sender: jchris@gmail.com To: couchdb-user@incubator.apache.org Subject: Re: when to use another document and when not to? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6b6419750807141546q63431cfek69184295a1cb25b0@mail.gmail.com> <0EEE59DA-C752-43E0-A605-31865F6E020F@apache.org> <3F8F49C2-EC5C-4E6D-AFC9-854C42F7FC6D@gmail.com> <13ae4dd50807271018t66ec2e78r6285c575ae16eddb@mail.gmail.com> <1C0517A9-69C9-441A-A2FB-37062A76FE0A@gmail.com> <13ae4dd50808060647v26e6bd14r709fc0aff72aa5b8@mail.gmail.com> X-Google-Sender-Auth: 64c3802ab458913c X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Aug 6, 2008 at 12:50 PM, Sho Fukamachi wrote: > > Chris, what did you think about my idea of attaching/making available _rev > information for views? > > Basically if we could get a _rev for every key-value output, could get an > array of them (however massive) for the "root" of a particular view, and a > "top" _rev for the view, it would make tracking changes much easier. I have > been messing around and think it would be pretty easy to make a decent > "sync" for remapping purposes if that info was available. I think that it's a feasible way to start down the path... I'd be curious to see what Damien thinks - he may have an eye on how to do this in a way that could eventually be used to support remapping natively. My first idea of how to do this was with an event system. If there was a way to "subscribe" to changes in a view (and which key they effect) you could use it to mark parts of the remap index as dirty. Then to regenerate you'd only have to recalculate the dirty parts (and also any keys in the view which aren't in the remap - making that search efficient might be problematic). The event system could be prototyped by eavesdropping on the communication between CouchDB and the view server, and firing events based on the emitted keys. -- Chris Anderson http://jchris.mfdz.com