I have complex js file that do some heavy calculation and save result to collection. This written in js because i wan't to avid data transmission.
currently i pass script to mongo shell in this way : $mongodb < path_to_script
The script consists of several functions?
Is it possible to execute it from PHP? I saw there is 'nolock' parameter that can be pass to evel method, is it possible to use it when executing from shell or from PHP?
What is consider more safe , using php execute wrapper or executing script from shell ?