Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 25966 invoked from network); 18 Aug 2010 01:27:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Aug 2010 01:27:08 -0000 Received: (qmail 95012 invoked by uid 500); 18 Aug 2010 01:27:08 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 94960 invoked by uid 500); 18 Aug 2010 01:27:07 -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 94952 invoked by uid 99); 18 Aug 2010 01:27:07 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Aug 2010 01:27:07 +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 (nike.apache.org: local policy) Received: from [209.85.160.180] (HELO mail-gy0-f180.google.com) (209.85.160.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Aug 2010 01:26:45 +0000 Received: by gye5 with SMTP id 5so4283196gye.11 for ; Tue, 17 Aug 2010 18:26:24 -0700 (PDT) Received: by 10.150.53.11 with SMTP id b11mr4687255yba.14.1282094784286; Tue, 17 Aug 2010 18:26:24 -0700 (PDT) Received: from [10.0.1.2] (c-24-130-240-73.hsd1.ca.comcast.net [24.130.240.73]) by mx.google.com with ESMTPS id q17sm657960ybk.17.2010.08.17.18.26.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 17 Aug 2010 18:26:23 -0700 (PDT) Sender: J Chris Anderson Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: multiview on github From: J Chris Anderson In-Reply-To: Date: Tue, 17 Aug 2010 18:26:21 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <4835209A-F0C3-493E-8ED9-E58FEC4B1C55@apache.org> References: <96CEF573-64EE-44B2-AC41-2A5A312A141D@apache.org> To: dev@couchdb.apache.org X-Mailer: Apple Mail (2.1081) X-Virus-Checked: Checked by ClamAV on apache.org On Aug 16, 2010, at 4:38 PM, Norman Barker wrote: > Hi, >=20 > I have made the changes as recommended, adding a test case > multiview.js and also adding the userCtx to open the db. >=20 > I have also forked geocouch and this is available here >=20 this patch seems important (especially as people are already asking for = help using it on user@) to get it committed, it either must remove the dependency on GeoCouch, = or become part of CouchDB when (and if) GeoCouch becomes part of = CouchDB. Is it possible / useful to make a version that doesn't use GeoCouch? And = then to make the GeoCouch capabilities part GeoCouch for now? Chris > http://github.com/normanb/couchdb >=20 > ./bootstrap > ./configure > make dev > utils/run >=20 > should do it and then the simple test case is available in Futon. >=20 > The test case multiview.js takes two views which emit docs which run > from 0 .. 100, view 1 emits those documents with ids which are > multiples of 3, view 2 emits those which are multiples of 4. The > _multiview request is the intersection of view 1 and view 2 resulting > those documents whose ids are multiples of 12. >=20 > Any comments appreciated, particular concerning the following; >=20 > 1) in the module multiview, is there a quicker way to find the counts > from startkey to endkey rather than iterating? > 2) In the module couch_query_ring is there a quicker way to test for > inclusion rather than iterating? >=20 > Many thanks, >=20 > Norman >=20 > On Fri, Aug 6, 2010 at 10:16 AM, Norman Barker = wrote: >> Chris, >>=20 >> I will make those changes, it might be a couple of days as I am on = travel. >>=20 >> I will clone geocouch as a starting point and add javascript tests as >> you suggest. >>=20 >> I am bench marking with around 10000 docs and a couple of views >> (including geocouch), the main issue with the folding over every >> document to both find the number of docs in a view slice (between >> startkey and endkey) and then again to test inclusion between views. >>=20 >> I am interested in taking this forward and appreciate any code = feedback. >>=20 >> thanks, >>=20 >> Norman >>=20 >> On Thu, Aug 5, 2010 at 6:26 PM, J Chris Anderson = wrote: >>>=20 >>> On Aug 5, 2010, at 4:32 PM, Jan Lehnardt wrote: >>>=20 >>>> Hi Norman, >>>>=20 >>>> I still plan to look at your code, I know the others here >>>> are fairly busy too, sorry for the review delay :) >>>>=20 >>>=20 >>> The code looks clean (but could use better comments about where in = the flow each module comes into play). I don't think we can guess about = performance, instead we should benchmark to make sure the ring approach = is right. >>>=20 >>> In CouchDB currently, it is possible to isolate requests against a = single db. So you use the security settings to prevent access to = databases, etc. For this, using the userCtx and switching away from = couch_db:open_int() would make a big difference. >>>=20 >>> This way people can query across dbs if they have read access to all = of them. >>>=20 >>> I think if you package this as a CouchDB fork on Github and add a = few JavaScript tests, it will be really useful for some folks. I like = that it has geo support. Maybe we can target it for inclusion in trunk = just after GeoCouch goes in trunk (if Volker wants to put it in.) >>>=20 >>> Also, for realtime hacking on this, you might find that the #couchdb = IRC channel on Freenode is a good place to solicit feedback. There are a = lot of people on there doing Geo things that would benefit from this. = (They really wanna be able to intersect a Geo query with a Map Reduce = query, etc.) >>>=20 >>> Chris >>>=20 >>>> Cheers >>>> Jan >>>> -- >>>>=20 >>>>=20 >>>> On 5 Aug 2010, at 18:12, Norman Barker wrote: >>>>=20 >>>>> Hi, >>>>>=20 >>>>> is there any interest in the multiview, I have fixed (3) below, = but am >>>>> still interested in approaches for (1) and (2). >>>>>=20 >>>>> thanks, >>>>>=20 >>>>> Norman >>>>>=20 >>>>> On Fri, Jul 30, 2010 at 3:39 PM, Norman Barker = wrote: >>>>>> Hi, >>>>>>=20 >>>>>> a very initial version of the multiview is at >>>>>> http://github.com/normanb/couchdb-multiview for discussion. >>>>>>=20 >>>>>> The views are intersected by using a ring of processes where each = node >>>>>> in the ring represents a view as follows; >>>>>>=20 >>>>>> % send an id from the start list to the next node in the ring, if = the >>>>>> id is in adjacent node then this node sends to the next ring node = .... >>>>>> % if the id gets all round the ring and back to the start node = then it >>>>>> has intersected all queries and should be included. The nodes in = the >>>>>> ring >>>>>> % should be sorted in size from small to large for this to be = effective >>>>>> % >>>>>> % In addition send the initial id list round in parallel >>>>>>=20 >>>>>> this is implemented in the couch_query_ring module. >>>>>>=20 >>>>>> I have a couple of questions >>>>>>=20 >>>>>> 1) in the module multiview, is there a quicker way to find the = counts >>>>>> from startkey to endkey rather than iterating? >>>>>> 2) In the module couch_query_ring is there a quicker way to test = for >>>>>> inclusion rather than iterating? >>>>>> 3) Finally, if I hit this concurrently I get an exception, >>>>>>=20 >>>>>> [error] [<0.201.0>] Uncaught error in HTTP request: {exit, >>>>>> {noproc, >>>>>> {gen_server,call, >>>>>>=20 >>>>>> (so ignore my previous email, I am able to trap the msg) >>>>>>=20 >>>>>> I am going to look into (3) but if you have seen this before. >>>>>>=20 >>>>>> I am developing on windows, but also test on linux I will work on >>>>>> getting a linux makefile, but the Makefile.win should be a start. >>>>>>=20 >>>>>> Any help and comments appreciated. >>>>>>=20 >>>>>> Norman >>>>>>=20 >>>>=20 >>>=20 >>>=20 >>=20