title: Am I ruining the benefit of using NodeJS / socket.io with my AJAX scripts?
body: <p>I'm creating an application that has a chat feature, and I decided to use NodeJS / socket.io for this.  My project also uses PHP, and I want to store data from my application in a MySQL server.  This is what currently happens</p>
  
  <p>socket.on (client connect) -> AJAX script that adds the new client's username to a MySQL database (I want to keep a list of users connected to the chat in MySQL)</p>
  
  <p>anyone sends a message -> AJAX script puts a timestamped version of that message into a MySQL database (Chat log)</p>
  
  <p>socket.off -> AJAX scripts removes the client from the MySQL database</p>
  
  <p>Am I using so much AJAX that I am ruining the benefit of using socket.io?  To my understanding: I am still getting the benefit of real-time connections with socket.io, and my AJAX is causing a separate load on my PHP server, but these AJAX actions shouldn't interrupt or block Node.  But will this separate load on the php server slow down the client-side socket.io connection?  I am new to Node / socket.io so I may be missing some fundamental knowledge about what's going on in the back-end.</p>