Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 37965 invoked from network); 15 Feb 2009 19:11:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Feb 2009 19:11:37 -0000 Received: (qmail 44304 invoked by uid 500); 15 Feb 2009 19:11:30 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 44268 invoked by uid 500); 15 Feb 2009 19:11:30 -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 44256 invoked by uid 99); 15 Feb 2009 19:11:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Feb 2009 11:11:30 -0800 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=FS_REPLICA,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jens@mooseyard.com designates 208.97.132.177 as permitted sender) Received: from [208.97.132.177] (HELO randymail-a3.g.dreamhost.com) (208.97.132.177) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Feb 2009 19:11:20 +0000 Received: from [10.0.1.105] (76-191-199-100.dsl.dynamic.sonic.net [76.191.199.100]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by randymail-a3.g.dreamhost.com (Postfix) with ESMTP id DE5F8185552 for ; Sun, 15 Feb 2009 11:10:59 -0800 (PST) Message-Id: From: Jens Alfke To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=Apple-Mail-1-867304566 Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Replicating partial databases, and validation Date: Sun, 15 Feb 2009 11:10:58 -0800 X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-1-867304566 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable I'm interested in using CouchDB in a peer-to-peer fashion to propagate =20= content between nodes that don't necessarily trust each other. The =20 available documentation sort of runs out before getting to many of the =20= aspects I'm interested in [I am eagerly awaiting more chapters of the =20= book!] but from reading the list archives and people's blog posts, it =20= sounds like it should be do-able. I'm just not clear on the details. =95 Is it possible to pull part of a database? For example, I might to =20= pull only nodes whose names start with a particular prefix, or whose =20 content contains a particular key/value pair. =95 Can the server validate the content of documents being pulled from =20= another DB? I may want to disallow updates that modify an "author:" =20 property, or whose "date:" property isn't in a valid format. Or I =20 might want to check a digital signature[1] on each incoming entry. =95 Likewise, can the server validate docs being posted directly, =20 outside of replication? Some sort of generic validator hook that got called on all docs being =20= added to the db, and could give thumbs up or down, would suffice. One =20= of jchris's blog posts[2] implies this exists, but he's deciphering =20 its functionality from a unit test, and as a total newbie I couldn't =20 follow the details of what this hook is capable of. =97Jens [1] Speaking of digital signatures, above =97 how would I perform = public-=20 key crypto operations from within a JS handler running in CouchDB? =20 Would this require writing glue libraries for SpiderMonkey, to call =20 into e.g. OpenSSL? [2] http://jchris.mfdz.com/posts/132= --Apple-Mail-1-867304566--