Reputation: 3682
This question might have been asked before. But those solutions did not solve my problem.
I have an application (express4, Node JS + Mysql) that is using twitter streaming API and getting tweets for a number of accounts / keywords in real time and adding it to a MySql database table.
On front end I am showing counts / stats on a dashboard. Now I am unable to find a way how should I update the stats from table at real time if a new record is added to table.
I have searched a lot there are different solutions like doing set interval and query database or polling.
Also pub/ sub or with radis. but I don't know how i can embed radis at this stage. or is polling database is a suitable option.
any guidance or help in right direction is highly appreciated.
Upvotes: 0
Views: 1208
Reputation: 75
What u can do is broadcast new count using socket.io when update comes. This will make it real time. If u don't want to use socket.io then u have to stick to polling for it.
Upvotes: 2