0

有没有一种方法可以在以下一系列活动之后更新客户端

   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通知客户端!任何建议,关于如何实现第四个指针的指针!

4

1 回答 1

0

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

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

两者都有广泛的教程 - 如果您可以更具体地了解您的需求,我可以帮助为您量身定制这个答案。

于 2017-08-22T00:25:42.633 回答