Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 65308 invoked from network); 2 Aug 2010 18:07:12 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Aug 2010 18:07:12 -0000 Received: (qmail 65078 invoked by uid 500); 2 Aug 2010 18:07:10 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 65031 invoked by uid 500); 2 Aug 2010 18:07:10 -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 65023 invoked by uid 99); 2 Aug 2010 18:07:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Aug 2010 18:07:10 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.83.180] (HELO mail-pv0-f180.google.com) (74.125.83.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Aug 2010 18:07:02 +0000 Received: by pvg12 with SMTP id 12so2186424pvg.11 for ; Mon, 02 Aug 2010 11:06:42 -0700 (PDT) Received: by 10.142.211.19 with SMTP id j19mr5612290wfg.24.1280772402019; Mon, 02 Aug 2010 11:06:42 -0700 (PDT) Received: from [192.168.1.102] (c-98-248-172-14.hsd1.ca.comcast.net [98.248.172.14]) by mx.google.com with ESMTPS id f2sm7997057wfp.11.2010.08.02.11.06.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 02 Aug 2010 11:06:41 -0700 (PDT) Sender: J Chris Anderson Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: Appropriate use of batch=ok? From: J Chris Anderson In-Reply-To: <239F8AD7-FA18-417A-85AE-36C6E77328CE@mac.com> Date: Mon, 2 Aug 2010 11:06:40 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <126853BB-C7E5-4D80-9787-A9FEECD3E754@apache.org> References: <239F8AD7-FA18-417A-85AE-36C6E77328CE@mac.com> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1081) On Aug 2, 2010, at 11:03 AM, Michael Beam wrote: > Hi All, >=20 > CouchDB is used throughout an application that I work on, and I was = thinking of using it for a new implementation of an old feature. The = feature involves other applications reporting progress of "jobs" to a = progress DB via documents that look like: >=20 > { > "_id":"a8baaee7963b4ee5893f0120514c4294", > "_rev":"35-8735bcf3c66945932acb4d573166f741", > "progress":0.87 > } >=20 > Since there may be potentially hundreds of processes updating their = progress docs relatively frequently (say, one update every 10 seconds, = maybe longer, maybe much longer) I figured this would be an ideal use = case for batch=3Dok in the PUT request that applications use to update = their job's progress to the database. However, I discovered that the rev = is not returned (which makes sense), which means that for an app to = update it's progress doc, it needs to get the rev through a separate = HEAD request. >=20 > In terms of overall load on the server, is anything gained by doing = lots of updates via HEAD/PUT-batch=3Dok versus a standard PUT? Or, am I = missing some other relevant aspect of Couch in my analysis of the = problem? >=20 batch=3Dok should really be renamed async=3Dtrue basically it allows a serial client to get really fast inserts, without = changing the load profile for CouchDB. In your case (where you need the rev) it is probably better to do a = regular PUT (or to batch requests on the client and use bulk_docs) Chris > Thanks in advance, >=20 > Mike >=20 >=20