Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 25064 invoked from network); 6 Jan 2009 17:22:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jan 2009 17:22:51 -0000 Received: (qmail 40656 invoked by uid 500); 6 Jan 2009 17:22:49 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 40620 invoked by uid 500); 6 Jan 2009 17:22:49 -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 40609 invoked by uid 99); 6 Jan 2009 17:22:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2009 09:22:49 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of devnullian@gmail.com designates 209.85.198.233 as permitted sender) Received: from [209.85.198.233] (HELO rv-out-0506.google.com) (209.85.198.233) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2009 17:22:42 +0000 Received: by rv-out-0506.google.com with SMTP id g37so7653138rvb.35 for ; Tue, 06 Jan 2009 09:22:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=lZPTtqnf1kde9llncxgH9uGpafGWKGjOsa+4fB7uPH8=; b=iXaql/6raH1dzihMGZujkhyRKQZgOEpTnl2BKGwlP7rblUcL1QIEaYuyLtA3lYGSjJ Q/7RDrqezpxIzH2jZjVJPMVbRsxFlwNQGwDHzOa3GTTwOCcWut2RBsh2DrEsqfxdkBBy nN6cPuT7+uPOpiCetLHp4qD1e1fjeUbeOWOww= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=gWG8X35DFtrqdcKGbesrjD7omeTW2mZKEanr6T7Ma/Jt0E+X0BLDdKj2l3+cfeBa3K euTtTK8c476GOqSN8jn+ZD5oX+iW8NZqgFK1Bx1I+pN8YL8GgKReNMXhmrAYlnMKrR48 WvZgvx/pP0io81a3/I6myZVkpakOyHQaiXupU= Received: by 10.140.187.10 with SMTP id k10mr7004925rvf.264.1231262542502; Tue, 06 Jan 2009 09:22:22 -0800 (PST) Received: by 10.140.200.1 with HTTP; Tue, 6 Jan 2009 09:22:22 -0800 (PST) Message-ID: <9f01072b0901060922h4c0a8cbajb546b3e616eae3fa@mail.gmail.com> Date: Tue, 6 Jan 2009 10:22:22 -0700 From: "Daniel DeLeo" To: user@couchdb.apache.org Subject: Re: Proposal: Extending immutability In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_242067_7646946.1231262542464" References: <9F8937BF-9332-416C-BA01-4B1D001EA029@gmail.com> <4EFE48A5-5D07-40D9-AF3C-C67802BE6955@gmail.com> <4A0B4B90-DF50-4861-B808-1F39A69DAEC5@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_242067_7646946.1231262542464 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Stop me if there's a better way to do this already, but: One possible use case for this feature could be an app with a drawing component, maybe a powerpoint-type thing, where the images are created and stored as SVGs, but viewed (or previewed or thumbnailed) as pngs. The app would know to recreate the png or at least test for changes to the SVG when couch reports an updated rev. Another use case could be a blog using markdown, possibly with markdown comments. The app could create and cache the HTML version for faster access, updating only when the source documents change. On the other hand, with view code like 'emit([doc.whatever, doc._id, doc._rev], null)' and using include_docs when the whole document is needed, one could accomplish this without requiring anything new from couch, albeit in a less elegant way. Just throwing it out there, but I think these use cases at least show how such a feature could be valuable. Cheers, Dan DeLeo On Mon, Jan 5, 2009 at 10:35 PM, Randall Leeds wrote: > On Mon, Jan 5, 2009 at 23:07, Chris Anderson wrote: > > > Again, I'm not sure that having the rev available on the view row > > makes a difference. The indexer cares about the keys and values, if > > they've changed, they've changed. > > > > This is true. However, it could be very expensive to compare the keys and > values to see if they've changed. You could put the burden on the > application developer to get around this by including some checksum in the > view, or just leverage the immutability of CouchDB's revisions and provide > it for free by returning the revision. I like this idea because it enables > this blurry use case we're all sort of imagining together while keeping the > actual map function focused on the real data that needs to be returned (as > opposed to metadata that enables some slick performance gain). > > -Randall > ------=_Part_242067_7646946.1231262542464--