简体   繁体   中英

Node.js service poller

I have an MVC web app that uses a jquery web request to generate the users notifications in a perceived async way. The notifications are built on request by each user on the site.

However I have been asked to make the notifications readily available as the happen.

This I would traditionally do using a windows service that called the same web method over http. I was thinking that this might be a good candidate functionality for using node.js

Is the any example code to call a http method in a loop and would that scale well ?

found this package and seems to do what i needed

https://npmjs.org/package/node-cron-jobs

I also came across "forever" to run node as a child process that can be re-spawned if there are errors

If you're already running on ASP.NET MVC take a look at SignalR . This was written by Microsoft, is supported by them and provides functionality similar to the Socket.IO, node.js stack.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM