I am trying to figure out the best way to handle a long-term task in Node.js. Obviously, a lengthy process in Node.js is not a good idea, because the single-threaded nature of Node.
I am a big fan of RabbitMQ, so I was thinking about having two node servers with a rabbit in between:
Node.js Web Server <--> RabbitMQ <--> Node.js Backend Worker
The idea, of course, is to not slow down the web server. Normally I would replace the backend server with Java, but I am trying to save all the JS.
I'm not a node programmer, so I'm not sure if this is a good idea or even possible? Has anyone tried something like this?
source
share