From user-return-9525-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Wed Mar 24 23:13:51 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 68443 invoked from network); 24 Mar 2010 23:13:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Mar 2010 23:13:51 -0000 Received: (qmail 91803 invoked by uid 500); 24 Mar 2010 23:13:50 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 91729 invoked by uid 500); 24 Mar 2010 23:13:50 -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 91720 invoked by uid 99); 24 Mar 2010 23:13:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Mar 2010 23:13:50 +0000 X-ASF-Spam-Status: No, hits=1.0 required=10.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of cap@unagon.com does not designate 80.237.132.27 as permitted sender) Received: from [80.237.132.27] (HELO wp020.webpack.hosteurope.de) (80.237.132.27) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Mar 2010 23:13:42 +0000 Received: from p5dcfd941.dip.t-dialin.net ([93.207.217.65] helo=[192.168.168.13]); authenticated by wp020.webpack.hosteurope.de running ExIM with esmtpsa (TLSv1:RC4-MD5:128) id 1NuZlH-0008VS-NH; Thu, 25 Mar 2010 00:13:19 +0100 Message-ID: <4BAA9C92.9060401@unagon.com> Date: Thu, 25 Mar 2010 00:13:22 +0100 From: Clemens Cap User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3 MIME-Version: 1.0 To: user@couchdb.apache.org, Clemens Cap Subject: Data mapping X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;cap@unagon.com;1269472422;22c2892d; Hi, I hope there is a nice solution for this issue which I do not see (as CouchDB newbie, who is getting more and more Couch addicted). I have documents which may content text and/or references to other documents. The client thus accesses an arbitrary document object, checks the references made to other document objects (whicha re to be included) and makes a second trip to the DB to get the refered documents (which again refer to documents, so we might have a third trip etc.) Now I would like to get all the documents in ONE call to the DB, since every trip to the DB means another http call and takes time. Actually it is kind-of a part explosion problem which I am having here. (If it helps, I could also provide a maximum nesting depth as part of the query). I tried a number of designs with map/reduce but failed. The tricky part is, that it is the document which knows the documents it contains (and not vice versa) - AND that the relation is not a tree, but a document might be referred to by a number of "parent" documents. Thus, storing the referred documents as part of the parent document is no option. Any ideas here ? Best regards and many thanx Clemens PS: I am currently having 1 sec. latency from a xmlhttprequest until even the most trivial results arrives. Since browser and couch are running on the same high performance quad core I am also a bit astonished that this is so much. Any ideas on this would also be great. This is on couch 0.10, Windows XP 64bit, Firefox 3.5, Apache 2.0 Xampp sitting in between as proxy for same-origin reasons.