I have a MYSQL database with an activity table whose rows are text statements(activities). My challenge is to Push the latest activity into the ticker(An area where all my latest activity display) as soon as it gets inserted into the table . I can achieve this pinging the table every N seconds , but this consume a lots of memory resourses and Server. So XML is the best way , but problem with how to create a XML file without Any load of MYSQL? Please suggest me how to achieve this . Thanks in advance !!!
You can use node's Net module or Socket.io to create and treat Websockets on the client and on the server.
As you handle a request from a user to push an activity into the table, you send a socket message to the client with this new activity, so you can update the ticker.
Websockets are designed to respond to PUSH requests (server to client) problematics, avoiding these costly "refresh every x seconds" operations.
Apparently HTML5 provides new tools to handle websockets, maybe you wish to have a look at them?
refer to: http://www.html5rocks.com/en/tutorials/websockets/basics/