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 E439F10C89 for ; Wed, 14 Aug 2013 18:37:55 +0000 (UTC) Received: (qmail 14248 invoked by uid 500); 14 Aug 2013 18:37:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 13976 invoked by uid 500); 14 Aug 2013 18:37: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 13960 invoked by uid 99); 14 Aug 2013 18:37:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Aug 2013 18:37:52 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mmarino@gmail.com designates 74.125.82.178 as permitted sender) Received: from [74.125.82.178] (HELO mail-we0-f178.google.com) (74.125.82.178) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Aug 2013 18:37:48 +0000 Received: by mail-we0-f178.google.com with SMTP id u57so7909399wes.23 for ; Wed, 14 Aug 2013 11:37:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=OcS+wTVgUP4HldcXc2gxHYtGWhcMQjBwUeUrWhs9OFk=; b=KeeNS2Y6C2B/VZMTsaj7ohafrDk5JekLhv9/ocBaYRKE03FmpqbqtVT+ucL5MItxC/ nuRBBE7d4+5ricGt9kjK7HGsfbvwOekty0LByBQWFJ/vj6xrz//Mc3+tBt37WwUGaStn dmicdNMi2nKEdLgjcX6QRowJMS1yi4POsgaCdowjtKFSuQ2CKrQHj18en3Rrx76Hi2GT dfe9m3zRdDidNz6WGPm7k8oU1JfGiTJBhHidEyvsEDO7mMnsJxThnHgHFmbrNT2VhTlD yKMtrYCPb7cRzQ41rFdwDaAUuKXgteEawML61HapxvEXdsr+BBlpm52GO7h4iuNTFB1u Pu8w== X-Received: by 10.194.22.41 with SMTP id a9mr7496608wjf.16.1376505446705; Wed, 14 Aug 2013 11:37:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.109.197 with HTTP; Wed, 14 Aug 2013 11:37:06 -0700 (PDT) In-Reply-To: References: From: Mike Marino Date: Wed, 14 Aug 2013 20:37:06 +0200 Message-ID: Subject: Re: Erlang vs JavaScript To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=047d7b5d86952eb4d004e3eca6b6 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5d86952eb4d004e3eca6b6 Content-Type: text/plain; charset=ISO-8859-1 I've seen some reasonably good performance gains writing the views in erlang instead of javascript (5-10 times faster), I suspect this must depend strongly on what's being done though in the view calculation. One thing that might be important to consider is the amount of time it takes to develop an erlang view, which I found could be challenging to debug (at least for me, an erlang newbie) using couch logs. If you're interested in real world translation examples (I had trouble finding some when I was building them), I have some javascript/erlang comparison views here: https://github.com/mgmarino/nEDM-Interface/blob/master/_defaulterlang/_design_erlang.json https://github.com/mgmarino/nEDM-Interface/blob/master/_default/lib/views.js Cheers, Mike On Wed, Aug 14, 2013 at 7:25 PM, Filippo Fadda < filippo.fadda@programmazione.it> wrote: > You can also write map and reduce functions in PHP using ElephantOnCouch > Query Server: > > https://github.com/dedalozzo/EOCSvr > > I still don't have integrated lists and shows, but I will do it soon. > > There are query server implementations in other languages also. > > -Filippo > > > On Aug 14, 2013, at 7:17 PM, Stanley Iriele wrote: > > > Oh wow...that is pretty snazzy....this is a bit of a dumb question but > can > > everything in a design doc be written in Erlang?..like list > > functions..shows..etc? > > On Aug 14, 2013 10:05 AM, "Robert Newson" wrote: > > > >> Erlang is faster and more feature rich. One thing you can do in an > >> erlang view that you can't do in javascript is > >> file:delete(AnyPathYourServerCanAccess), which is why we disable it by > >> default. :) > >> > >> Building a view is inherently serial regardless of the language > >> evaluating each update. > >> > >> B. > >> > >> > >> On 14 August 2013 18:02, Alexander Shorin wrote: > >>> Erlang server bypassed stdio interface communication and addtional > >>> JSON decode/encode roundtrip, so it is faster than JS at some point. > >>> Also, having Erlang with SMP feature enabled may also improve his > >>> performance if you have multicore server. > >>> > >>> How much? No numbers I have, just an experience background. You can > >>> measure it with you functions and data and share with us (: > >>> > >>> -- > >>> ,,,^..^,,, > >>> > >>> > >>> On Wed, Aug 14, 2013 at 8:54 PM, Stanley Iriele > >> wrote: > >>>> I'm curious... What exactly is the performance gain from writing > >>>> views/shows/ etc in Erlang vs JavaScript... From what I've seen the > >>>> JavaScript view server is sufficiently fast and feature complete. > >>>> > >>>> So my question is this.... Is the Erlang view server that much > >> faster?... > >>>> Is there another gain that I'm missing?..and is it as feature complete > >> as > >>>> the JavaScript equivalent? > >>>> > >>>> Regards, > >>>> > >>>> Stanley > >> > > --047d7b5d86952eb4d004e3eca6b6--