title: WebSockets, Comet, AJAX & Long Polling
body: <p>My understanding of <strong>Comet</strong> is that its a server-side AJAX request. My understanding of <strong>Long Polling</strong> ("Push") is that it is also a server-side AJAX request. My understanding of <strong>WebSockets</strong> is that they are a two-way AJAX request.</p>
  
  <p>If any of these are wrong, please begin by correcting me!</p>
  
  <p>Assuming I'm more or less correct, is it true that these are all just AJAX (JavaScript using <code>XmlHttpRequest</code> object under the hood)? If they are not all just AJAX calls, then how do you implement them in the client (via JavaScript) and on the server (using something like Java)? Thanks in advance!</p>