title: How Websockets are implemented?
body: <ul>
  <li>How Websockets are implemented?</li>
  <li>What is the algorithm behind this new tech (in comparison to Long-Polling)?</li>
  <li>How can they be better than Long-Polling in term of performance?</li>
  </ul>
  
  <p>I am asking these questions because <a href="http://jansipke.nl/websocket-tutorial-with-java-server-jetty-and-javascript-client/" rel="noreferrer">here we have a sample code of Jetty websocket implementation (server-side)</a>.</p>
  
  <blockquote>
    <p>If we wait long enough, a timeout will occur, resulting in the
    following message on the client.</p>
  </blockquote>
  
  <p>And that is definately the problem I'm facing when using Long-polling. It stops the process to prevent server overload, doesn't it ?</p>