title: Push large number of clients update
body: <p>At the moment i am using prime push to send a refresh command to the client's jsf page and the jsf page will then reload itself and render the changes. It looks something like that:</p>
  
  <p>Server:</p>
  
  <pre><code>EventBus eventBus = EventBusFactory.getDefault().eventBus();
  eventBus.publish("/event/" + eventId, "updateEntries");
  </code></pre>
  
  <p>Client:</p>
  
  <pre><code>&lt;p:socket channel="/event/#{detailController.id}" onMessage="handlePush"/&gt; 
  &lt;script type="text/javascript"&gt;
      function handlePush(msg) {
          switch (msg) {
              case "updateEntries":
                  updateEntries();
                  break;
          }
      }
  &lt;/script&gt;
  
  &lt;h:form&gt;
      &lt;p:remoteCommand name="updateEntries" actionListener="#{detailController.reloadEntries()}" update="entries" /&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>However this works pretty well but i think if i have more clients this will become a performance issue because every client requests the hole data at the same time.</p>
  
  <p>My idea was to encode the entity which changed/added and transfer the json via the push to the client and decode the json and add it to the datatable. </p>
  
  <p>Is there any other way how to deal with a large number of clients which need instant updates?</p>