title: How to talk to R from Node.js?
body: <p>I'd like to do intensive, non-interactive calculations/data analysis using R. The analysis requests would be called from a Node.js/Express backend.</p>
  
  <p>The input structure is a JSON of ~100kB and the calculation should run asynchronously, of course. The output data from the data analysis in R is much smaller (~5kB). Binary data formats (e.g. protobuf) could be used as well. There is no visualization involved.</p>
  
  <p>I'm new to R but found a package which leverages ZeroMQ (as client). Already used øMQ in another project => would be my favorite way to communicate, but I'm open to any kind of efficient and stable communication (e.g. Redis).</p>
  
  <ul>
  <li>Is it possible to run some kind of R-Server? If yes, does it run nearly as stable as Node.js? (I could use <code>monit</code> to watch and restart a process like I'm doing it with node.)</li>
  <li>How could I talk from Node.js to R?</li>
  <li>Does R have to create an expensive new session for each request or reuse existing ones?</li>
  </ul>
  
  <p>Environment: Debian/Ubuntu, available as well: Redis, MongoDB</p>