Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 94871 invoked from network); 14 Apr 2008 20:27:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Apr 2008 20:27:53 -0000 Received: (qmail 1673 invoked by uid 500); 14 Apr 2008 20:27:54 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 1519 invoked by uid 500); 14 Apr 2008 20:27:53 -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 1510 invoked by uid 99); 14 Apr 2008 20:27:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Apr 2008 13:27:53 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of brian@briansmith.org designates 216.86.168.179 as permitted sender) Received: from [216.86.168.179] (HELO mxout-04.mxes.net) (216.86.168.179) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Apr 2008 20:26:59 +0000 Received: from T60 (unknown [70.136.53.160]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id A413BD05A4 for ; Mon, 14 Apr 2008 16:27:17 -0400 (EDT) From: "Brian Smith" To: References: Subject: RE: PUT / POST tradeoffs Date: Mon, 14 Apr 2008 13:27:18 -0700 Message-ID: <001401c89e6d$f016d070$0302a8c0@T60> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Thread-Index: AciHv7qlzWTyyCmsSd63c6mYmND+TwWrRSSw X-Virus-Checked: Checked by ClamAV on apache.org Chris Anderson wrote: > The alternative approach is to forgo the MD5 hash calculation, and > POST the parsed data into CouchDB, creating a new record with an > arbitrary id. I imagine that I would end up with a lot of identical > data in this case, and it would become the job of the > Map/Combine/Reduce process to filter duplicates while creating the > lookup indexes. PUT is almost always better than POST; if you experience network failures, you can retry the PUT without any ill effects. If you use POST, and your experience a network partition before you get the response, how will you determine whether or not the POST succeeded? See "Post Once Exactly" (http://www.mnot.net/blog/2005/03/21/poe), HTTPLR (http://dehora.net/doc/httplr/draft-httplr-01.html), and their related discussions. - Brian