Node.js to Python communication - server or child process?
<p>I am currently at a project that is mainly written in Node.js, which involves non-linear curve fitting. After trying to do this task with Node.js itself, I gave up on it, because it is simply impractical. So I was looking for a high level language for solving mathmatical problems like that one I am facing. I had to decide between MATLAB and Python, but since Python has really powerful methods by now and it's free, I decided to go with Python. </p>

<p>Now I need to find a way to communicate between Node.js and Python, and I already found two completely different approaches:</p>

<ol>
<li>Setting up a Python server, that solves the mathematical problem as described <a href="https://stackoverflow.com/questions/10775351/combining-node-js-and-python">here</a></li>
<li>Or spawning a child process from my node.js code as described <a href="http://www.sohamkamani.com/blog/2015/08/21/python-nodejs-comm/" rel="nofollow noreferrer">here</a></li>
</ol>

<p>Now I would usually go with the client server approach because in my opinion it is cleaner, because it separates both languages. But since somebody is writing a blog post about the second approach, there must be some advantage with it, right? </p>

<p>Would somebody briefly explain what are the advantages and disadvantages with both approaches in this case ?</p>