couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Marino <mmar...@gmail.com>
Subject Re: Erlang vs JavaScript
Date Wed, 14 Aug 2013 18:37:06 GMT
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" <rnewson@apache.org> 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 <kxepal@gmail.com> 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 <siriele2x3@gmail.com>
> >> 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
> >>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message