From user-return-2884-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Mon Jan 12 12:34:59 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 71412 invoked from network); 12 Jan 2009 12:34:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jan 2009 12:34:59 -0000 Received: (qmail 58542 invoked by uid 500); 12 Jan 2009 12:34:57 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 58498 invoked by uid 500); 12 Jan 2009 12:34:57 -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 58483 invoked by uid 99); 12 Jan 2009 12:34:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jan 2009 04:34:57 -0800 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 antony.blakey@gmail.com designates 209.85.198.237 as permitted sender) Received: from [209.85.198.237] (HELO rv-out-0506.google.com) (209.85.198.237) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jan 2009 12:34:47 +0000 Received: by rv-out-0506.google.com with SMTP id g37so10528333rvb.35 for ; Mon, 12 Jan 2009 04:34:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=tb+oRoQhHODkS9dalipjGBZ2xEvh/QyupVAYg1fq6x8=; b=EgXw9mwf7ZpzNMoZcKVBQ4B0bavJ72No3NgGVbgO1eGsO3k33dUY8SeBSAstQ9l1oo VgHs6O3ACqqLK2HcNju6T4u6Kl4cvHHjay7SnwAR5+lV1/TuvC829ECe5X9D4fe3UdUy zHh7tdvI3XnX4u/7yHVute6pWvYEtHQzGKFZs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=U67CGxKyzsza2yYoWqFyAjr1nsArbs6fZxZMFv0ZGGnXLGDkM+g+XDpI4cjSfPeLQY lm7DwV9au/+wLZrqy07TR8ooHLSfeAfgrj9qf7vrgkVNgNffJJYgWMudY1kaA5iU/isz 6fsRlxJUu+WbW3aaAlif2BkbHNgWVpJ8+J0fw= Received: by 10.141.85.13 with SMTP id n13mr14373067rvl.105.1231763666350; Mon, 12 Jan 2009 04:34:26 -0800 (PST) Received: from ?192.168.0.16? (ppp121-45-81-35.lns10.adl6.internode.on.net [121.45.81.35]) by mx.google.com with ESMTPS id b8sm11803217rvf.9.2009.01.12.04.34.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 12 Jan 2009 04:34:25 -0800 (PST) Cc: dev@couchdb.apache.org Message-Id: <29E4D3CA-D6C3-426A-896E-EDD237C0B08C@gmail.com> From: Antony Blakey To: user@couchdb.apache.org In-Reply-To: <20090112115611.GF15392@tumbolia.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: Proposal: Extending immutability Date: Mon, 12 Jan 2009 23:04:20 +1030 References: <9F8937BF-9332-416C-BA01-4B1D001EA029@gmail.com> <1B6846D7-3E47-4E08-ABE0-890BC447B3BE@gmail.com> <20090112115611.GF15392@tumbolia.org> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org On 12/01/2009, at 10:26 PM, Noah Slater wrote: > On Mon, Jan 12, 2009 at 05:15:39PM +1030, Antony Blakey wrote: >> --- Revised Proposal --------- >> >> Each document, whether canonical or derived, has a globally unique >> identity consisting of a UUID and the document ID. >> >> In the case of a canonical document, the UUID is the UUID of the >> database (or cluster), which is assigned when a database is created. >> >> In the case of a (derived) view map result, it is the UUID of the map >> function (not the design doc), which is assigned to each map function >> (i.e. view) in a design doc when the design doc is created or >> updated. >> >> Furthermore, there is a triple {UUID, document id, document rev} that >> globally identifies a document at a given point in time. The key >> characteristic being that a {UUID, id, rev} identifies an immutable >> value. For views it is slightly more complex. At a first blush you need to include the key because a given map function can emit multiple view rows per document. But from a theoretical standpoint it's worse than that, because the map function can emit multiple view rows with identical keys but different values. This is a pathological scenario however, and IMO a generic middleware that doesn't deal with that situation is still extraordinarily useful. Antony Blakey ------------- CTO, Linkuistics Pty Ltd Ph: 0438 840 787 A reasonable man adapts himself to suit his environment. An unreasonable man persists in attempting to adapt his environment to suit himself. Therefore, all progress depends on the unreasonable man. -- George Bernard Shaw