Wednesday 9 December 2015

How to run computationally expensive method in express.js route?

I want to apply some machine learning in a POST route, every time it gets called, and ultimately return the results in the response. A computationally expensive task would be blocking in native node.js correct? Should I spawn python or C code in my route, pass in the arguments, and open competition get the result forwarded backwards? Also, suppose I natively performed the machine learning algorithm in node.js, if that route got hit several times, the computation would truly be separate each time correct?

Submitted December 09, 2015 at 05:39PM by -proof

No comments:

Post a Comment