The reason we use an embedded scripting environment is so that the control can be handled by Erlang. Its quite true that we could have an external system doing Map/Reduce a la CouchDB-Lucene but that would just increase the pain point, plus make things even harder to move between systems due to configuration overhead etc.<p>Though the point of this post was mostly to play with the new erlang_js package as well as try and determine what cost is associated with the stdio communication channel used by the current view generation model.