Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 89989 invoked from network); 20 May 2009 19:19:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 May 2009 19:19:31 -0000 Received: (qmail 63688 invoked by uid 500); 20 May 2009 19:19:42 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 63599 invoked by uid 500); 20 May 2009 19:19:42 -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 63589 invoked by uid 99); 20 May 2009 19:19:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 May 2009 19:19:42 +0000 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 sshumaker@gmail.com designates 209.85.221.111 as permitted sender) Received: from [209.85.221.111] (HELO mail-qy0-f111.google.com) (209.85.221.111) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 May 2009 19:19:31 +0000 Received: by qyk9 with SMTP id 9so1030901qyk.13 for ; Wed, 20 May 2009 12:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=D3lNOGjemBH9ayP6mqGDQMqmtYztfrk2K4PXkVjCX5Y=; b=gpnwrC/TAdHMcvB0N0e1fqQ62W0ai9kWU5wXXl62Qc9nEc4OVgzPDZBXz9I5GGcdw0 dN2xNBJkq3R6GcPxo3DbVAskc/77UBrY0OUBrli/AKk0FhjSocl8mx2tt/BR9/TAkD16 /SxjMKbtoBjwrmTB/XucLHnp/92g44P+mMskc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=GFFRMuiSPmlaIsyA+yckbNYbzHlztOv20OuTXJSDxWtVIGWWmxRNqFuB7yx2SnNm5j YRtyBkzeshN77/c4RlsCCN1D+HvIWYwOCX5c3FC3ejVjusN6zmp0//GNySyxeE4ByxBY bg4IKI5rXbCoPZXJrVkULyLVIM/XNRf3I6Vrw= MIME-Version: 1.0 Received: by 10.224.45.203 with SMTP id g11mr1750776qaf.16.1242847149636; Wed, 20 May 2009 12:19:09 -0700 (PDT) In-Reply-To: <3D0253C3-9FC1-4322-85AB-A22DF4454E4E@apache.org> References: <1d3db2990904230838r34a4c060t5ae305e67145a285@mail.gmail.com> <46aeb24f0904230933u1a9bad32r9dfdb073c768a11a@mail.gmail.com> <1d3db2990904230959q24530cbat420cee8688f53490@mail.gmail.com> <46aeb24f0904231014u6cc5adadx4900ffb43b66a819@mail.gmail.com> <1d3db2990904231310i4716a023sdcd4b5287a33e08@mail.gmail.com> <261cf6280905120113i72595eb1m79333c3cb2a8c77@mail.gmail.com> <261cf6280905161628t5b888a2fh81a7b49a06e8efa8@mail.gmail.com> <3D0253C3-9FC1-4322-85AB-A22DF4454E4E@apache.org> Date: Wed, 20 May 2009 12:19:09 -0700 Message-ID: <261cf6280905201219o228907e3wac57f1fbae87c5d@mail.gmail.com> Subject: Re: how to do http request within server-side _show or _view functions? From: Scott Shumaker To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Apparently at the cost of limiting the functionality of dozens of unrelated features - everything from transactions to validation. I grow ever more convinced that CouchDB's replication is an albatross. It's analogous to RAID-1 - easy to code but pretty limited (and now very outdated) tech. It wouldn't be a problem if it were an isolated feature, but it hamstrings so many others. Maybe it makes sense for a particular kind of project, but for most real-world applications you can get better (more scalable, higher performant, and more reliable) results with some sort of Paxos or Vector-clock architecture with multiple committers and readers. I do hope to see CouchDB move in that direction - and I think it has a good chance of becoming the web persistent storage engine of choice if it does. Scott On Sun, May 17, 2009 at 1:43 AM, Jan Lehnardt wrote: > > On 17 May 2009, at 01:28, Scott Shumaker wrote: > >> Why are the validation functions run at replication time? > > As far as the data store in CouchDB is concerned, replication is > just another client doing GETs & PPSTs). Replication uses the > same API any user faces. > > Cheers > Jan > -- > > >> >> On Tue, May 12, 2009 at 5:33 AM, Chris Anderson wrot= e: >>> >>> On Tue, May 12, 2009 at 1:13 AM, Scott Shumaker >>> wrote: >>>> >>>> Not ideal, but it works. =A0I'd love for validate_doc_update to take >>>> HTTP headers - especially an additional JSON parameter, like a custom >>>> userCtx. >>>> >>> >>> The problem with this approach is that the validation functions are >>> run at replication time as well as at initial update time. This is why >>> we need to abstract the http information into a userCtx, because the >>> full request object won't be available for replay later (and the >>> replicating userCtx is used at rep time, not the original Ctx, so >>> replay wouldn't be appropriate anyway.) >>> >>> Both concerns in this thread (custom http auth & using user creds from >>> a db) are best addressed by writing another authentication handler or >>> two. I believe there is work underway to do this but I'm not sure the >>> current state. >>> >>> We are very open to patches in the auth handler section of the code. >>> Please inquire on dev@ (or drop a patch on >>> https://issues.apache.org/jira/browse/COUCHDB) if you'd like to help >>> here. >>> >>> Chris >>> >>> >>> >>> -- >>> Chris Anderson >>> http://jchrisa.net >>> http://couch.io >>> >> > >