0

I've seen a lot of arguing back and forth about whether to use Python or Node.js for the backend, but when should you be using a combination of both?

For example, if I need to pull 3000 tweets from 200 users, then run them all through an algorithm and graph each occurrence of the word 'the', it can be done in multiple ways. Clearly this is decently intensive if you have a bunch of users all doing it.


  1. Using Node.js exclusively I'd import the necessary modules, write a server.js with all my functions and then call node server.js

  1. Using Python exclusively I'd import the necessary modules, write a server.py with all my functions and then call python server.py

  1. Using Node.js and Python I'd write algorithm.py that flushes out the computed data, then I'd write server.js that spawns a child process with algorithm.py in it, then I'd call node server.js

When and why would you ever use 3 if you could simply use 1 or 2? It seems like it would be way slower to use, harder to write asynchronously, and overall more complex.

ARMATAV
  • 604
  • 6
  • 26
  • Possible duplicate of [Combining node.js and Python](https://stackoverflow.com/questions/10775351/combining-node-js-and-python) – Obsidian Age Jun 22 '17 at 02:45
  • *"why would you ever use 3"* - If you were using Node in a general sense but happened to already have a Python module that does just what you need? – nnnnnn Jun 22 '17 at 03:08

0 Answers0