Currently, i have created an application in node.js to send notification to all client using socket.io with mysql. So any change in my mysql database will be notified to the multiply clients through socket.io instantly. The application work charm.
The problem i'm facing is related to performance issue.
My browser get the constant push notification from the server, which slows down the performance of my browser. I/Client need to get the notification only on the database change, rest of the time the Server should be in pause state, with out sending any message to cilent.
In other words i need to implement long polling technique.
How do i implement long polling with socket.io?
I have googled to look for an example, but i found none which could help me to implement long polling with socket.io and mysql in node.js
Is it possible to implement long polling with socket.io?
If so, could somebody redirect me to some useful link with example?
Thanks in advance.