通知客户端使用某种形式的基于Node.js作业队列上传文件后,读取,插入操作



有没有办法在以下一系列活动后更新客户端

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

我能够表演

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 

因此,我想放入作业队列,完成后通过 socket.io 或 RabbitMQ 通知客户端! 任何建议,关于如何实现第四指针的指示!

假设您的客户端是某种形式的 Web 客户端,您可以选择使用推送和/或长轮询技术将消息发送回客户端。

这样做的两个流行库是: https://socket.io/http://www.lightstreamer.com/

两者都有广泛的教程 - 如果你能更具体地说明你需要什么,我可以帮助你定制这个答案。

最新更新