incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Shorin <kxe...@gmail.com>
Subject Re: add_lib in reducers?
Date Thu, 04 Apr 2013 06:21:03 GMT
Hi Samuel!

There is issue with patch about it:
https://issues.apache.org/jira/browse/COUCHDB-1202

And there is the explanation why so:

> One other issue: currently I haven't yet implemented commonjs for
> reduce functions. The reason I have not is that reduce functions are
> not batched, so library code would have to be sent and eval'd every
> single time the reduce function is run. On top of this, 99% of the
> time the reduce function won't make use of the library code, so it
> will just be dead weight. (I have a hard time thinking of when a
> reduce function will need to require library code).

http://mail-archives.apache.org/mod_mbox/couchdb-dev/201009.mbox/%3CAANLkTi=hFvB8__sSfqtfZykv3E-H0oDcduqaZMtVE9Rc@mail.gmail.com%3E

Hope they make things clear (:

--
,,,^..^,,,


On Thu, Apr 4, 2013 at 5:44 AM, Samuel Williams
<space.ship.traveller@gmail.com> wrote:
> Hi,
>
> I've implemented a Ruby query server.
>
> I wanted to have libraries available to reduce functions.
>
> Is it okay to have add_lib add libraries to both mapper context and reduce
> context?
>
> The method of loading libraries seems a bit cumbersome in the current
> implementation, reducers are treated quite differently from mappers. Is
> there any plan to improve this going forward?
>
> Kind regards,
> Samuel

Mime
View raw message