Need Suggestion On How To Get Automated Notification Simillar To Facebook
I am developing a app which has the functionality similar to facebook. I want to know how can i get notification like they have in their app. I have done everything, whenever i refresh my page i will get new notifications. But i dont want it to refresh everytime. It should be automated, whenever my friends comment on my post, i should get a notification in my page without refresh. That means i have to pull the data from database when ever there is any new row in my "db table".
I have approached this by creating a div and through jquery i am refreshing it every(1)second. Page is not refreshing but my issue is every second i am interacting with DB to check new updates. This will be issue if i am having 1k members in my site. Is this correct approach? If not please let me know how can i get this solved?
I heard about comet notification, but there are some issues with speed when my site user counts go more