Do you always use RabbitMQ and Node.js for a lengthy process?

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?

+5
source share
1 answer

, " " - Node.JS, . - ( , -, ) .

, -, -. , - -. - -. ( - , I/O. , .)

Node.JS, , , ( - ). , , . , RabbitMQ, .

// -, . -, - , nginx, .

0

All Articles