I am using working on web app which had a DIV in which latest update about a topic is shown which is coming from some other website. So what i want is to update the DIV as soon as the data is really updated in back end database.
On the back-end I am using cron to fetch & store data in database.
A simple way of doing this is to use setInterval()
function and keep on fetching the data at a particular time interval but I think this would just cause unnecessary load on the server and just waste CPU cycles.
So what's the best way to implement this? can/should i use nodeJs for this?
-Thanks
P.S. I just want something like facebook uses to upddate it's news feed in the middle of page.
and i have no experience with nodeJs yet so honestly i don't even know that nodeJs is good for this or not.