I am developing a website that is having some requirement like instant update to all users.
If my site have 5 viewers rit now, and I am showing the like count when a person click on like button increase count to all other users. if the like count is 10 then someone click the like button I increased the count using ajax to the database to show this update to everybody I called a ajax call for every 5 seconds and checking that is there any likes or not. Am I doing rit? or Is there any other better way to trigger the database affect to all users?