Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DA933102F8 for ; Thu, 15 Aug 2013 06:36:55 +0000 (UTC) Received: (qmail 24517 invoked by uid 500); 15 Aug 2013 06:36:53 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 24458 invoked by uid 500); 15 Aug 2013 06:36:53 -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 24450 invoked by uid 99); 15 Aug 2013 06:36:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Aug 2013 06:36:52 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of siriele2x3@gmail.com designates 74.125.83.48 as permitted sender) Received: from [74.125.83.48] (HELO mail-ee0-f48.google.com) (74.125.83.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Aug 2013 06:36:45 +0000 Received: by mail-ee0-f48.google.com with SMTP id l10so160996eei.35 for ; Wed, 14 Aug 2013 23:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=h6mm2Tzs4nwnfSmVjTrTwowm2FTpunUMrwVWJ6fDaVE=; b=vkU3tr2KigF1aAmtZVqsbJ0Wk06xWb7wHiCNK2FLu/wqA466p042WXb8fV87psnyqJ ahaErJ9ygDLnL5WAQFLqyyQtZSclS+xOETOtmFgffvDCU3N6Am0LnuHy5Q1axo+pflLN E6mXoKJzQoWJIfbne8xFAaBUON+WEuUBILH5I1KSOs8dTplPRPEoRyuXMm5IJ7OqoaCc e0nzg+h+2R/tpN9z7KBpu7GkuDbmUzsat6ngQMAiVTJAQdnTr9S6Mm4LUGKFenXFhlWJ T5hu6/dEiE0YgVjjTrzcJIt1RTmr0mWbxv1nEQ9Nnd2voUqad+qWwZdAFfuFFu9H7Iak 0DeA== MIME-Version: 1.0 X-Received: by 10.14.219.198 with SMTP id m46mr20170730eep.41.1376548585746; Wed, 14 Aug 2013 23:36:25 -0700 (PDT) Received: by 10.14.121.14 with HTTP; Wed, 14 Aug 2013 23:36:25 -0700 (PDT) Received: by 10.14.121.14 with HTTP; Wed, 14 Aug 2013 23:36:25 -0700 (PDT) In-Reply-To: References: Date: Wed, 14 Aug 2013 23:36:25 -0700 Message-ID: Subject: Re: Erlang vs JavaScript From: Stanley Iriele To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=047d7b60399c78567904e3f6b1bb X-Virus-Checked: Checked by ClamAV on apache.org --047d7b60399c78567904e3f6b1bb Content-Type: text/plain; charset=ISO-8859-1 Wait....I'm a tad confused here..Jason what is the difference between native views and Erlang views?... On Aug 14, 2013 11:16 PM, "Jason Smith" wrote: > Oh, also: > > They are **not** Erlang views. They are **native** views. We should > emphasize the latter to remind ourselves about the security and reliability > risks which Bob identifies. > > They are very powerful, but it is a trade-off. Once I had a customer who > had a basic "class" document describing common values. All other documents > were for modifications to the "base class" so to speak. He needed to query > by document ID, but if no such document existed, return the "base class" > document instead. The product was already in the field and so the code > could not change. We had to change it in CouchDB. > > The fix was very simple: a _rewrite rule to a native _show function. In the > show function, if the Doc was null, then we used the internal CouchDB API > to fetch the default document. Voila. > > > On Thu, Aug 15, 2013 at 1:08 PM, Jason Smith wrote: > > > On Thursday, August 15, 2013, Andrey Kuprianov wrote: > > > >> Doesnt server performance downgrade, while views are being rebuilt? So > the > >> faster they are rebuilt, the better for you. > > > > > > If my view build would degrade total performance to cross an unacceptable > > threshold, then I am really riding the line! What about an unplanned > > compaction? What if one day the clients have a bug and load increases? > What > > if an unplanned disaster happens and a backup must be performed urgently? > > > > I would evaluate view performance in the larger context of the entire > > application life cycle. > > > > Men seem to want to date beautiful women. It is a very high priority at > > the pub or whatever. But long-married men do not even think about their > > wife's attractiveness because that is a small, superficial part of a much > > larger story. > > > > > >> > >> Besides, looks like it's possible to do the same 3 steps with design doc > >> views created in Erlang? Or is it just about using require() in Node.js? > >> > > > > Actually, yes that is a fine point. I myself prefer Node.js but anyone > can > > choose the best fit for them. > > > > And speaking more broadly, CouchDB is a very flexible platform so it is > > quite likely that my own policies do not apply to every use case. In fact > > if I'm honest I use native views myself, usually for unplanned > > troubleshooting, I want to find conflicts so I use manage_couchdb: > > http://github.com/iriscouch/manage_couchdb > > > > My main point is, anybody time somebody says "performance" ask yourself > if > > it is really a "performance siren." Earlier in this thread, Jens raises > > some examples of plausible true performance requirements, not just siren > > songs. > > > --047d7b60399c78567904e3f6b1bb--