Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 9059 invoked from network); 14 Nov 2008 11:57:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Nov 2008 11:57:34 -0000 Received: (qmail 78988 invoked by uid 500); 14 Nov 2008 11:57:37 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 78917 invoked by uid 500); 14 Nov 2008 11:57:36 -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 78877 invoked by uid 99); 14 Nov 2008 11:57:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Nov 2008 03:57:36 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [80.68.94.123] (HELO tumbolia.org) (80.68.94.123) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Nov 2008 11:56:14 +0000 Received: from nslater by tumbolia.org with local (Exim 4.69) (envelope-from ) id 1L0xFE-0007FD-AI for couchdb-user@incubator.apache.org; Fri, 14 Nov 2008 11:53:48 +0000 Date: Fri, 14 Nov 2008 11:53:48 +0000 From: Noah Slater To: couchdb-user@incubator.apache.org Subject: Re: Document Updates Message-ID: <20081114115348.GA24001@tumbolia.org> Mail-Followup-To: couchdb-user@incubator.apache.org References: <27d8d0930811130840t47269d91o9539fae200bcd380@mail.gmail.com> <20081113164344.GB15315@tumbolia.org> <99294D7F-4D06-47F9-800B-DB9213D929F4@gmail.com> <20081113220313.GG15315@tumbolia.org> <20081113233718.GI15315@tumbolia.org> <20081114040241.GJ15315@tumbolia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Noah: Awesome User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Nov 14, 2008 at 05:35:03PM +1030, Antony Blakey wrote: > I'm not tunneling verbs, I'm just re-using the names of the methods that would > normally be used as selectors. I wasn't implying anything more than that. ... > You delete a document using the DELETE verb, yet in a bulk operation you set > the "_deleted" special attribute. That is in effect tunneling the DELETE, > using a different representation, within a POST. A RESTful system should work by exchanging representations of resources. As best I understand it, if you want to modify a resource in a way that is not a direct update, move or delete you should use a separate media type, something like application/diff+json if it existed. A JSON diff could include ways to delete and update multiple documents at the same time, a bit like UNIX diff is able to specify filenames. This could be used for single or bulk updates. Of course, this feels very similar to your original proposal, which leaves me a little confused. Throwing about JSON with keys such as "POST" and "DELETE" feels very RPC-like. Perhaps the difference is the use of a separate media type. I am eager to be corrected by any resident RESTafarians. For me, REST is a bit like Zen. Sometimes I think I understand it totally, and other times I'm convinced that I don't understand it at all. Best, -- Noah Slater, http://tumbolia.org/nslater