<div dir="ltr"><div>Hello!<br></div><div><br></div><div>right now, we use HTTP (via Google&#39;s Sender), and they only allow 1000 tokens, per request to GCM, that means, we have a lot of (blocking) requests (see below trace).</div><div>We loop over the our &#39;processGCM&#39;, which internally invokes the HTTP sender from google:</div><div><a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/push/sender/src/main/java/org/jboss/aerogear/unifiedpush/message/sender/GCMPushNotificationSender.java#L118-L129">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/push/sender/src/main/java/org/jboss/aerogear/unifiedpush/message/sender/GCMPushNotificationSender.java#L118-L129</a></div><div>(they use HttpUrlConnection inside of that &#39;sender&#39;)</div><div><br></div><div>I see some improvements here:</div><div>* make the requests to google concurrent</div><div>* use persistent XMPP connection (<a href="https://issues.jboss.org/browse/AGPUSH-36">https://issues.jboss.org/browse/AGPUSH-36</a>)</div><div><br></div><div>Regarding AGPUSH-36 we could extract that into a tiny libray, to be used by UPS (like we did with others). </div><div><br></div><div><br></div><div>Greetings,</div><div>Matthias</div><div><br></div><div><br></div><div>{sending some requests to GCM, in a loop with blocking http request}</div><div>21:13:00,059 INFO  [GCMPushNotificationSender] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:01,568 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:02,646 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:03,495 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:04,291 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:05,171 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:06,054 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:06,982 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:07,846 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:08,748 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:09,662 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:10,527 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:11,384 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:12,253 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:13,349 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:14,283 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:15,164 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:16,004 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:16,796 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:17,620 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:18,407 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:19,158 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:19,942 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:20,696 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:21,587 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:22,388 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:23,055 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:23,763 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:24,490 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:25,351 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:26,125 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:26,857 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:27,545 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:28,208 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:28,865 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:29,523 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:30,299 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:30,973 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:31,588 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:32,196 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:32,796 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:33,404 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:34,174 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:34,799 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:35,354 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:35,893 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:36,449 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:36,991 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [1000] devices to GCM</div><div>21:13:37,488 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Sending payload for [10] devices to GCM   // yes, I had 48010 devices</div><div>21:13:37,525 INFO  [ClientInstallationServiceImpl] (EJB default - 2) Message to GCM has been submitted </div><div><br></div>-- <br><div class="gmail_signature">Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div>
</div>