1

I am Planning an implementation of a file processing web app . The idea is to have a queuing mechanism where user uploads file which can be queued and Worker Nodejs process can pick up unprocessed records from the queue.

for the queue part I came across https://github.com/Automattic/kue . Having read the documentation I kind of understand that the queue object kicks-off processes

My first question is : Do they have a way whereby another workker process can 'Pick' to process that entry itself , instead of the queue itself initiating process?Or can i assign each job to target worker process

My second question is: assuming each worker process gets one job at a time assigned to it. and a socket endpoint wants to send progress notification to whoever uploaded that file to the web server, Can socket.io emit message to particular IP? I understand that each client(browser ) have to connect to the socket server to start receiving messages. But in my case Worker process are planned to pick entries from Queue . Is is feasible to initiate a socket.io connection from server side...instead of browser initiating it .?

Hoping to get some idea . as I havent coded much for Multiple instances of nodejs worker process.

here is a illustration of what i mean basically enter image description here

Manotosh sil
  • 21
  • 1
  • 5

0 Answers0