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