Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 31732 invoked from network); 9 Jul 2008 16:03:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jul 2008 16:03:21 -0000 Received: (qmail 38945 invoked by uid 500); 9 Jul 2008 16:03:20 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 38918 invoked by uid 500); 9 Jul 2008 16:03:20 -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 38907 invoked by uid 99); 9 Jul 2008 16:03:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2008 09:03:20 -0700 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: domain of paul.joseph.davis@gmail.com designates 64.233.178.246 as permitted sender) Received: from [64.233.178.246] (HELO hs-out-0708.google.com) (64.233.178.246) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2008 16:02:29 +0000 Received: by hs-out-0708.google.com with SMTP id 23so753027hsn.12 for ; Wed, 09 Jul 2008 09:02:51 -0700 (PDT) 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=9xMhwY2wIVy37PhMZizBxSTi1GifbCVfvzF42w1Iyr4=; b=iLVFauidCunmDBLXYpTCZbv6Tx58PLwaDL+o19IK1SFbcyMtg6EE46/57vqtUGhpGa 1EA9wQQM3nLdf4nkXDnxA81GdTOcLt3STOR+4jmPfVXldBPzO7fvZ03tZZrPJVYB4KWg sE+g6U7Ajps4WXf/u8MNdK9y+qAuLhbc3O3lI= 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=obQHfKHo2UIfOFdqJ81W6GfOCdBSHauihRfeHUu4XpMW+etkoKo+cIvpl69deSaETD J11RtOWNR2iZ3LlusmEIy7ncxTb0BIUK8BiLPbUGUJs95m9FJEZVqGoqOn33xhqGIizr VQRyW1Fo5tEWG9TH2lGmpJnDi8hydmP+LCCc8= Received: by 10.100.57.6 with SMTP id f6mr6521738ana.155.1215619371225; Wed, 09 Jul 2008 09:02:51 -0700 (PDT) Received: by 10.100.154.5 with HTTP; Wed, 9 Jul 2008 09:02:50 -0700 (PDT) Message-ID: Date: Wed, 9 Jul 2008 12:02:50 -0400 From: "Paul Davis" To: couchdb-user@incubator.apache.org Subject: Re: thoughts on bulk_docs In-Reply-To: <372EC480-C40B-48EF-B6B1-1ABD436BF584@blit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <372EC480-C40B-48EF-B6B1-1ABD436BF584@blit.com> X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Jul 9, 2008 at 4:10 AM, Troy Kruthoff wrote: > Regarding previous discussions about multi-key gets, I was thinking why not > just bring bulk_docs into parity with the rest buzzword we're a giddy about. > Example, instead of > > { > "docs": [ > {"_id": "0", "integer": 0, "string": "0"}, > {"_id": "1", "integer": 1, "string": "1"}, > {"_id": "2", "integer": 2, "string": "2"} > ] > } > > do > > { > "put[||post]": [ > {"_id": "0", "integer": 0, "string": "0"}, > {"_id": "1", "integer": 1, "string": "1"}, > {"_id": "2", "integer": 2, "string": "2"} > ] > } > > so later, when supported we could do cool stuff like: > > { > "get": ["id1","id2","id3"] > } > > and/or even cooler > > { > "get": [ > {startkey:"a", endkey:"b", count:100}, > {startkey:"c", endkey:"d", count:100}, > {startkey:"e", endkey:"f", count:100} > ] > } > > and/or even bulky crazy > > { > "get": [ > {startkey:"a", endkey:"b", count:100}, > {startkey:"c", endkey:"d", count:100}, > {startkey:"e", endkey:"f", count:100} > ], > "put[||post]": [ > {"_id": "0", "integer": 0, "string": "0"}, > {"_id": "1", "integer": 1, "string": "1"}, > {"_id": "2", "integer": 2, "string": "2"} > ], > "delete": ["id1","id2","id3"] > } > > > For me, keeping the concepts of rest exposed through the bulk_docs api just > seems sexy. I'd take a crack at this, but it would take awhile, as Erlang > and I have yet to dance, although my beer goggles are starting to work, so > it may not be long! -- Meaning Erlang sure is ugly, but couchdb (and > ejabberd) are starting to make it look attractive (for me anyways...) > > -- troy > I'm suprisingly liking this idea. IIRC, there's already code in the couch_view.erl to do this insert/delete/fetch in one pass through the view which makes me think it wouldn't actually be that hard to implement. Any core developers want to chime in with a slap down or blessing for attempting to implement it? Paul