Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 38124 invoked from network); 7 Apr 2009 13:19:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Apr 2009 13:19:05 -0000 Received: (qmail 17520 invoked by uid 500); 7 Apr 2009 13:19:04 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 17439 invoked by uid 500); 7 Apr 2009 13:19:04 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 17425 invoked by uid 99); 7 Apr 2009 13:19:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2009 13:19:04 +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 b.candler@pobox.com designates 207.106.133.19 as permitted sender) Received: from [207.106.133.19] (HELO sasl.smtp.pobox.com) (207.106.133.19) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2009 13:18:53 +0000 Received: from localhost.localdomain (unknown [127.0.0.1]) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTP id BC732A8D00; Tue, 7 Apr 2009 09:18:31 -0400 (EDT) Received: from mappit (unknown [80.45.95.114]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTPSA id 229FAA8CFF; Tue, 7 Apr 2009 09:18:29 -0400 (EDT) Received: from brian by mappit with local (Exim 4.69) (envelope-from ) id 1LrBC8-0004HT-Ap; Tue, 07 Apr 2009 14:18:28 +0100 Date: Tue, 7 Apr 2009 14:18:28 +0100 From: Brian Candler To: Scott Shumaker Cc: dev@couchdb.apache.org Subject: Re: Removing PUT 409? Message-ID: <20090407131828.GB16013@uk.tiscali.com> References: <261cf6280904061240r7c3388d9yf1153c8dfc286bd9@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <261cf6280904061240r7c3388d9yf1153c8dfc286bd9@mail.gmail.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Pobox-Relay-ID: 97326D0E-2376-11DE-8DB3-BB14ECB1AA3C-28021239!a-sasl-fastnet.pobox.com X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Apr 06, 2009 at 12:40:33PM -0700, Scott Shumaker wrote: > Getting rid of conflict handling greatly limits the utility of CouchDB > for real-world applications (it will certainly force us to adopt > another technology instead). And worse, this is all for the goal of > supporting multi-master replication, which really isn't a great > technology solution anyway. If you want durability and scalability, > CouchDB should really adopt the much more robust multiple write nodes > / read nodes system (with quorum and reconciliation) in Dynamo or a > few other distributed key/value stores. There's a Dynamo paper here: http://s3.amazonaws.com/AllThingsDistributed/sosp/amazon-dynamo-sosp2007.pdf The write primitive is put(key, context, object) where 'context' includes versioning info. Does put() ever fail simply because the object context is stale? From reading this paper I get the impression that it doesn't, but I could be wrong. [1] I do like the idea that when there are multiple versions, the get() primitive returns all of them, together with a context which refers to all the versions included. A put() in this context will then automatically mark the conflict as resolved. I think it would be good for CouchDB to handle GET in the same way, rather than picking a single arbitrary version. However, CouchDB also needs to deal with multiple versions in views too. Would it be reasonable for a view to contain data from *all* the live versions of a document, rather than just one? Each map row is tagged with "id" already, so it could be tagged with "id" and "rev". Regards, Brian. [1] Section 6.3 says: "Divergent versions of a data item arise in two scenarios. ... The second is when the system is handling a large number of concurrent writers to a single data item and multiple nodes end up coordinating the updates concurrently."