I have a web app running in PHP over CakePHP framework in IIS on a Windows 2008 server machine.
Now, this application is polling every 6 seconds per connected user to refresh part of the screen and this is causing tends of requests to the IIS server and slowing the whole system down when the Oracle database is busy.
In an attempt to solve this issue I'm thinking of using Node.js to solve this problem and using push notifications. This way every 6 seconds Node would push notifications to all active browser clients.
The problem I'm facing is that the call I'm making is making use of the logged user session. (to call the DB, and once I get the data, to update the session).
I've read Redis can be a solution for this and I've seen posts explaining how to share the session. But there's something I don't get yet:
How could I have the session of the logged user? Should I iterate over all active sessions?
I want to create a setInterval
in node to query the DB for each logged user.