Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 47393 invoked from network); 28 Oct 2008 03:49:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Oct 2008 03:49:43 -0000 Received: (qmail 17623 invoked by uid 500); 28 Oct 2008 03:49:46 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 17593 invoked by uid 500); 28 Oct 2008 03:49:46 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 17582 invoked by uid 99); 28 Oct 2008 03:49:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Oct 2008 20:49:46 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jchris@gmail.com designates 64.233.182.185 as permitted sender) Received: from [64.233.182.185] (HELO nf-out-0910.google.com) (64.233.182.185) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Oct 2008 03:48:30 +0000 Received: by nf-out-0910.google.com with SMTP id c7so1155041nfi.40 for ; Mon, 27 Oct 2008 20:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=XZuQxJSljyv4vtp92chc2lfq8Xa5b46CP52Z/o6AE4Y=; b=ums85j67Q7nV+yq3LTYJnqmFtGWfnEWv5fpwtNxMpibBQuKe3/h/jm/zy7UqHUFLvY KIVA3UWQI8/RySlyuTJxGqIER13EmLi6SPsVMH3BeyzGXzcRwcMOBZV4ahHuEQ19YeGS Xe088HoXKySAiCOlJh/zUUn5/jD6eu1OaIJ/o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=GWe39QOojSjuI1ARXy1FYsDkcSv+gdS9eYfusbuXPNWsYmSWGCb9beMQc5X20+onR7 cBx0ukibN/HLmOSsm+7+sDJ/dYELSNCYuxbsf01J8I6q6gvdE8YOca6j0L6vv6GTKa31 edIUbLwc+xwNIRpMMaaNKBGhm6PKb/8f4dLDM= Received: by 10.210.19.4 with SMTP id 4mr7693931ebs.173.1225165739377; Mon, 27 Oct 2008 20:48:59 -0700 (PDT) Received: by 10.210.54.17 with HTTP; Mon, 27 Oct 2008 20:48:59 -0700 (PDT) Message-ID: Date: Mon, 27 Oct 2008 20:48:59 -0700 From: "Chris Anderson" Sender: jchris@gmail.com To: couchdb-user@incubator.apache.org Subject: Re: Getting only updates from a view In-Reply-To: <64a10fff0810271954p369b9a49w677084772de187d5@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <83FAD073-9DD0-495C-B70D-C587CA3563FD@msc-mobile.com> <27d8d0930810260736g58acbd4bn61c417d3e1fd3b95@mail.gmail.com> <64a10fff0810271039w1a561c3djf75b7ffbdd182c35@mail.gmail.com> <4AC6C22D-55D8-4C39-8542-02F6525E4954@msc-mobile.com> <64a10fff0810271954p369b9a49w677084772de187d5@mail.gmail.com> X-Google-Sender-Auth: 688604f0daf32075 X-Virus-Checked: Checked by ClamAV on apache.org Plus 1 for the idea of sandboxing each client application in its own database. If you really are going to allow end users to write views, you should at least read and understand the security implication of this: http://peter.michaux.ca/article/8069 It sounds like your application could be a strong fit for couchdb, but it might take some thought to figure out how best to use it. Cheers, Chris On Mon, Oct 27, 2008 at 7:54 PM, Dean Landolt wrote: > Wow. That's a wholelotta client apps. In this case yeah, there may not be a > great way to generalize the views since it sounds like you don't even > control them, but from the little I've been able to glean, you may want to > take some measures to sandbox this view creation somewhat. If all views go > into the same design document, one view's change results in all views being > rebuilt -- probably not what you want. So perhaps each client should get > their own design doc where they can create their views... > > But I'd go a little further and suggest that if you have that many clients > who need ultimate control over views, perhaps you may want to rethink the > architecture. Letting clients design your views could get a little hairy -- > one rogue view could take down your whole system. I don't know anything > about the data you're keeping, but perhaps you could expose it certain ways > useful to as many clients as possible, but punt on all that processing. Let > the clients deal with that -- and for those that really need their own > views, just replicate them an instance of the db and they can add all the > views they want. > > > On Mon, Oct 27, 2008 at 1:58 PM, Julien Guimont < > julien.guimont@msc-mobile.com> wrote: > >> Hello, >> >> That is an option i do not completely understand right now. If there are >> blog post on the subject that would be great! >> >> My usage scenario is the following: >> I have many client applications (1000-10000) >> They send to my application server what they want as a data set (a view) >> The application server adds the view to the design document, execute it and >> return the result to the client >> Upon document updates, the application server refresh the views and inform >> the client of new data (is any) >> >> Am I going in a good direction? >> >> Thank you, >> Julien. >> >> >> On 27-Oct-08, at 1:39 PM, Dean Landolt wrote: >> >> On Sun, Oct 26, 2008 at 10:08 PM, Julien Guimont < >>> julien.guimont@msc-mobile.com> wrote: >>> >>> Thanks for the answer, pretty obvious. >>>> >>>> I would have 1000 to 10000 views to update periodically upon document >>>> updates. There would be 5-10 updates a second and more than 500k >>>> documents. >>>> Will couchdb scale in that case? >>>> >>>> Thank you, >>>> Julien. >>>> >>> >>> >>> What kind of use case would require 10000 views? Couldn't there a way to >>> generalize some of your view functions with compound keys to give you what >>> you need in a *much* smaller number of views? >>> >> >> > -- Chris Anderson http://jchris.mfdz.com