From dev-return-7689-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Fri Dec 18 02:40:18 2009 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 684 invoked from network); 18 Dec 2009 02:40:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Dec 2009 02:40:18 -0000 Received: (qmail 88289 invoked by uid 500); 18 Dec 2009 02:40:18 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 88161 invoked by uid 500); 18 Dec 2009 02:40:17 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 88151 invoked by uid 99); 18 Dec 2009 02:40:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Dec 2009 02:40:17 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jchris@gmail.com designates 209.85.216.180 as permitted sender) Received: from [209.85.216.180] (HELO mail-px0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Dec 2009 02:40:06 +0000 Received: by pxi10 with SMTP id 10so1772297pxi.13 for ; Thu, 17 Dec 2009 18:39:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=OpVfTvi/0zmZDPTtKDNnspfBQOUUBJuj8wmTloyDIkM=; b=ppu1PnTlu+di7VXKniee2hJtKKd3Fh09n9lgUz5sq4exuLIq8jmnFJUsEb7zTMaJf8 5hKOzkyZa7IkhT41d/jFrIOavp32nzpV+gdE2vR0TF7BkcfoNJWBSzs80UhME1nYoIDk dSSPk/gYFtA3PaulG/vouEpgM7/OFyZkJpnoo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=qcwlA5Ui4gVQPPbKjsSLNcWQX6PKfltxlWm3si7FVglkC8c9p3txqVBn3i2OlyDNMz 9vmPbUzMMU0z+jerFQ90S+1i3t+DqTEm1mZPwN1SnTS+VNAsZherhTOHYEsjvSGAY4R7 ynBgCQnQQR5tW97GyQXPuZre3IazgbNA8rakY= MIME-Version: 1.0 Sender: jchris@gmail.com Received: by 10.142.60.11 with SMTP id i11mr2163472wfa.270.1261103982742; Thu, 17 Dec 2009 18:39:42 -0800 (PST) Date: Thu, 17 Dec 2009 18:39:42 -0800 X-Google-Sender-Auth: 497bd6562e824870 Message-ID: Subject: ddoc protocol for query server From: Chris Anderson To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 I've been working on a medium-sized branch for a while and I'm finally getting something worth showing... almost. I'm developing on http://github.com/jchris/couchdb/tree/ddoc-qs The essential difference is in the way the code is handled by the query server. The query server keeps a cache of design documents around. This allows us to simplify the programming model for show, list, update, etc, and also I think will make it easier to add new commands in the future. My aim was to cut a lot of code, but stay close to a pure refactoring. So I haven't substantially changed the Futon test suite. But I did make some changes to query_server_spec.rb. If anyone would like to pull the Erlang query server into line with these changes, I'd appreciate the help. The branch is still deeply messy in some places. When it comes time to push to CouchDB trunk, I'll hand-edit the patch for log levels and inane comments. Chris -- Chris Anderson http://jchrisa.net http://couch.io