How can I write map-reduce functions in Erlang for CouchDB? I am sure Erlang is faster than JavaScript.
pmap(F, L) ->
Parent = self(),
Pids = [spawn(fun() ->
Parent ! {self(), F(X)}
end) || X -> L],
[receive {Pid, Res} -> Res end || Pid < - Pids].
I believe I did, Bob.
You can do so using erlview, which is within the top ten hits on Google for "couchdb erlang view" and is listed on the CouchDB wiki page for other-language view servers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With