Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 94139 invoked from network); 3 Jan 2009 00:53:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jan 2009 00:53:01 -0000 Received: (qmail 16589 invoked by uid 500); 3 Jan 2009 00:52:59 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 16557 invoked by uid 500); 3 Jan 2009 00:52:59 -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 16545 invoked by uid 99); 3 Jan 2009 00:52:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jan 2009 16:52:59 -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 jchris@gmail.com designates 74.125.46.28 as permitted sender) Received: from [74.125.46.28] (HELO yw-out-2324.google.com) (74.125.46.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Jan 2009 00:52:50 +0000 Received: by yw-out-2324.google.com with SMTP id 3so1921218ywj.5 for ; Fri, 02 Jan 2009 16:52:29 -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 :content-transfer-encoding:content-disposition:references; bh=lc6M0ZgkLnJLcOBgO0N1aGp+dGjc8HJXlSbz3IqbvCk=; b=vgrK8TCjz+kJsHoQ2yzd/3u7Oz5ST57YDRhj5fHLzq2NKknqE6hRlcPpaOQ8ZSN+P9 OiU3iffgYt/ScdPHHL7e9/Mj4GPTN3N4J5l8W7IoQUn6fFHf1sAQU4FLs92mM9slfzBF FphbDKFMJ0j00CixOo/Xxb7qhd+/BbNaoshAc= 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:content-transfer-encoding:content-disposition :references; b=S5aE0kFQE1osxgmmbJQOHhseFvUQmC+eqSL5oVKG/M+VDIAsdFL91W6N7hPD+FYvUj 3s9JkjzO+4vBMScqmd4o+lKChm7IoGJ6dfAPawZyzwtMcF66RnxX3PIgh8RKyOpYQyfM 9b1FFeSy+ikRT4KEH2lAV+1l4uQva2lV7j5fA= Received: by 10.65.74.16 with SMTP id b16mr12590505qbl.1.1230943949267; Fri, 02 Jan 2009 16:52:29 -0800 (PST) Received: by 10.65.73.3 with HTTP; Fri, 2 Jan 2009 16:52:29 -0800 (PST) Message-ID: Date: Fri, 2 Jan 2009 16:52:29 -0800 From: "Chris Anderson" To: user@couchdb.apache.org Subject: Re: Does CouchDB check autogenerated document id's? In-Reply-To: <214c385b0901021610p1289148dr5cf4e8522574b6f9@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <21939021.1440421230910477169.JavaMail.servlet@perfora> <46D7ECAF-8D5E-46D4-BFD3-302B3CB1DBEC@jasondavies.com> <4F6E3427-CFDD-472E-BE2F-1E1CB6D04257@jasondavies.com> <214c385b0901021610p1289148dr5cf4e8522574b6f9@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Jan 2, 2009 at 4:10 PM, Matt Goodall wrote: > 2009/1/2 Jason Davies : >> >> On 2 Jan 2009, at 16:11, Paul Davis wrote: >> >>> Also, as a random aside, why does _uuids require a POST? >> In the normal case you would POST a document to a collection when you want the server to choose the final URL. However, intermediaries have a habit of retrying POSTs randomly, so when you POST and id-less Couch document, occasionally duplicate documents are created. We work around this by recommending PUT as the document creation method. Of course clients can specify any document id they'd like to, but for lightweight clients CouchDB provides the _uuids service. The POST is pragmatic for cache-control reasons, but also RESTy, because it exposes the service that CouchDB uses internally for directing document POSTs to new ids. By using the _uuids service, clients can become the part of CouchDB that would direct documents to URLs in a collection. -- Chris Anderson http://jchris.mfdz.com