couchdb-erlang mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <>
Subject Re: Erlang design documents
Date Tue, 23 Oct 2012 12:18:07 GMT

The relevant code is in couch_native_process.erl and is, afaik, the
best documentation on the rarely-used native view server.

Functions are declared in bindings/3 and named as follows;


CommonJS is not supported in the native view server.

Finally, and obviously, this view server is not well documented, and
perhaps usage should be discouraged as there is no sandbox, any
command can be executed as the user that couchdb is running as within
any callback function (which is one compelling reason not to run
couchdb as root, among many).


On 23 October 2012 11:24, Noah Slater <> wrote:
> Hmm. No responses? 69 subscribers. I'm sure we can do better than that.
> Come on, folks! ;)
> On 17 October 2012 16:51, Alexander Shorin <> wrote:
>> Hi, Couchers!
>> Probably this question is not about how to hack into CouchDB internals
>> with Erlang, but how to use Erlang with CouchDB. Since there is native
>> support of Erlang query server it's reasonable to try use Erlang ddoc
>> functions to solve bottlenecks (Erlang filters are extremely fast) and
>> just use Erlang to write couchapps. Since there is a lot of
>> information about JavaScript couchapps, I feel confused with trying to
>> write non-hello-world Erlang functions: shows/lists/vdu. While
>> JavaScript one has special execution context (provides, registerType,
>> start, send, getRow, require etc.) I wonder what could be used with
>> Erlang. Is there getRow function and how it supposed to work? What
>> about others? CommonJS modules interface is supported or there is
>> another, better way to import inline ddoc modules?
>> I think this information would be useful for all of us. Thanks(:
>> --
>> ,,,^..^,,,
> --
> NS

View raw message