The first order of business according to me would be to allow for views in elixir.
I stared off with reading the couch_mrview, couch_native_process and couch_query_server codes.
So far here are my findings and suggestions to implement the required feature:
(Please refer my codes -> https://gist.github.com/sivsushruth/df40dbd950b8b68d62d8)
- Add an alternate process for elixir, say couch_elixir_process and add entry to local.ini
- Add :application.start(elixir) to elixir_process
- Extract common patterns and functions from couch_native_process
One way to go forward from here is,
- Convert elixir view code to erlang and try to handover converted source code to couch_native_process functions.
Here is the gist for a tiny hack I wrote, to show what can be achieved.
I think the above proposed method can be viable and quick to implement as we are not reinventing the wheel here, rather extending the current couch_native_process for elixir support.
Let me know what you guys think.