I went through some questions here on Stack Overflow about how to get MySQL data in real-time. Someone suggested using websockets, and someone else suggested AJAX. I tried AJAX, and it works, but with firebug I see that the client makes a request every “n” seconds. I made a similar test with Facebook, and I realized that the client makes the request only when data is actually added to the database.
I am wondering if using AJAX will overload MySQL server with too many requests, considering that a User A may needs to see updates from more than 100 users, and those 100 users need to see updates from more than another 100, while using websockets may mean that there are fewer requests.
Is that achievable with websockets? Has anyone already tested http://nodejs.org ?
Have you looked at Socket.IO? http://socket.io/