0

is there a way by which i can update client side after below series of activities

   1 upload file
   2. read file
   3. bulk insert 
   4. update client that job is completed.

I am able to perform

1.upload file through through busboy. 
2.read file node sync/async node.js file read.
3.bulk insert sequelize bulk insert.(data read through bluebird mapSeries).
4.(missing piece) since i insert around 200k records in single shot. it might take some time 

hence i was thinking put in a job queue and after completion notify client through socket.io or rabbitMQ ! Any suggestions, pointers on how to achieve 4th pointer !

Rizwan Patel
  • 538
  • 2
  • 9
  • 27

1 Answers1

0

Assuming your client is some form of Web Client, you have the option to use push and/or long polling technologies to send a message back to the client.

Two Popular libraries to do so are: https://socket.io/ http://www.lightstreamer.com/

Both have extensive tutorials - if you could be more specific about what you need I can help tailor this answer to you.

Eric H
  • 1,323
  • 3
  • 14
  • 29