title: Persistent push with comet long-polling on Jetty?
body: <p>I am trying to create a Jetty servlet that allows clients (web browsers, Java clients, ...) to get broadcast notifications from the web server.</p>
  
  <p>The notifications should be sent in a JSON format.</p>
  
  <p>My first idea was to make the client send a long-polling request, and the server respond when a notification is available using Jetty's Continuation API, then repeat.</p>
  
  <p>The problem with this approach is that I am missing all the notifications that happen between 2 requests.</p>
  
  <p>The only solution I found for this, is to buffer the Events on the server and use a timestamp mechanism to retransmit missed notifications, which works, but seems pretty heavy for what it does...</p>
  
  <p>Any idea on how I could solve this problem more elegantly?</p>
  
  <p>Thanks!</p>