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.
- Using Node.js exclusively I'd import the necessary modules, write a
server.jswith all my functions and then callnode server.js
- Using Python exclusively I'd import the necessary modules, write a
server.pywith all my functions and then callpython server.py
- Using Node.js and Python I'd write
algorithm.pythat flushes out the computed data, then I'd writeserver.jsthat spawns a child process withalgorithm.pyin it, then I'd callnode 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.