title: Push notifications with ajax
body: <p>I've searched everywhere for this issue, all I found is same problem but with other programming language, so that didn't help me a lot :(</p>
  
  <p>Now I'm using Hibernate, Struts to develop my web site, when an user connect I should display unread messages. I've developed my own solution, but seems to me very costly here it is: </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var auto_refresh = setInterval(
      function ()
      {           
          var url = "&lt;%=request.getContextPath()%&gt;"+"/MessagesRecus.do"; 
          jQuery("#messages").load(url).fadeIn("slow");
      }, 400); //Raffraichir chaque 1 seconde
  &lt;/script&gt;
  </code></pre>
  
  <p>MessagesRecus.do : is an action that gets unread messages from the DB</p>
  
  <p>I've learned, while I was looking on the other sites, about push notification system.
  Does anyone have an idea about it? 
  any other suggestion is welcome :)
  Thank u in advance.</p>