title: Implementing a live chat system in Website
body: <p>I would like to add a live chat support channel in my website, mainly focused on new users who have specific questions about my services and i´be been thinking about the best way to implement this solution myself. do note that i do not intend to use third party solutions.</p>
  
  <p>What i´ve thought about <strong>retrieving messages:</strong> i can have a form on the page that will activate on user click (like a "start chat" button), once the button is clicked, i will <code>GET</code> all messages in the database related to the client's IP address (if it's not a logged in user) through a web service and load it into the DOM. after this, i will have a javascript function that will execute every XX seconds asking whether there are new messages.</p>
  
  <p>to <strong>send messages</strong>: the user will have a textArea with a "send" button that will trigger a <code>POST</code> to a web service in order to save their message into the database, on the Support/web admin side, everything will work in a similar fashion but with the option of having several chats at the same time. Also i think I can achieve this by using JQUERY and ajax requests.</p>
  
  <p>Is this a good idea to implement a live chat services? or am I far off from the ideal way of doing this? I have browsed around and all i get is suggestions to use third party service which i definitely do not want to use. Thanks!</p>