So I've got a few ideas for how to implement this, but I hope some people
more experienced with the platform can give some feedback before.
In UPS right now we have a concept of categories. A single UPS message can
be broadcast to a bunch of devices which are subscribed to this category.
Google now supports this for GCM on Chrome, iOS, and Android so UPS can
send a single message to GCM and GCM will broadcast that to up to a million
End Quick Background
So first, how do we switch between sending a message to each device in a
category to sending a topic message to GCM?
In TokenLoader.java#L113 we are using the clientInstallationService to
build a string of deviceTokens based on the variant and message criteria.
Is there any reason we can't create a "topicToken" which will be recognized
later by GCMPushNotificationSender? Another benefit to making this change
here is that if we have over a million subscribers to the category we can
just default to the default messaging.
There is also an open issue of whether or not we will update the clients to
filter based on what category a message was sent to. To do this we will
have to include the category information in the message when we send it to
devices going forward. In GCM a topic message includes this information.
This means that if we have over a million subscriptions in the topic we
will need to fall back to using the category information anyway.
Continuing on from the thread of falling back, it is possible for a topic
message to fail to send because there are too many subscribers. How would
UPS handle regenerating the messages as deviceToken instead of topicToken
Of course if someone has a better idea than "topicTokens" I'm all ears.
so as outlined in previous thread , I have prototyped a JMS batching
approach for push message delivery.
We've discussed the approach with Matthias, Mirek Novak and Ondrej
Chaloupka (EAP QE & JMS/JTA experts, thank you guys!) and these documents
describes a concept that we have came with:
Implementation-wise, I've so far prototyped the messaging part (split
SenderService functionality to two subsequent queues with MDBs as shown on
but that's just a start, since we must configure it appropriately for
efficiency (queue configuration and batch sizes) and verify that
configuration works as expected,
the prototype lives on a branch (unpolished, to be squashed later):
Off course, you can play with it already. :-)
Apart from the new requirement of using Java EE full profile (JMS), the
prototype leverages implementation-specific configurations and APIs:
- org.hibernate.Query for token streaming / batch fetching
- HornetQ configurations of queue size, blocking behavior and message
That pretty much binds us to WildFly/EAP - we can tweak it to run on any
compliant app server, but without specific configurations it won't work
Once configured and functionally tested (that can even wait for Beta2 I
we can cooperate with Mobile QE on testing (Stefan, Adam), their test suite
contains mocks of APNS/GCM against which we can load test.
Guys and gals,
UPS is currently using a fork of Google's rest-client sample to communicate
with Google's servers (See the previous thread UPS and com.ganyo:gcm-server
for details**). This is an outdated fork from https://github.com/google/gcm.
It is in fact very outdated. The rest client code, Message and Builder
objects, Constant fields, and Sender code don't support all of the
fields/errors/etc needed for GCM topics messaging. Additionally it uses a
deprecated field in a few places. I've filed two* issues*** in the gcm
project to reach out and begin work with them to resolve this in a more
sane way. In the meanwhile we will probably have to patch and support our
own fork of the library.
Thoughts, comments, tomatoes?
PS, this will probably bump XMPP support from aerogear-android-push 3.0 and
UPS 1.2. Please let me know if it should and i will pull those from the
JIRA epics and we can reschedule them.
I’ve successfully got an iOS variant to register categories for installations in my cordova app using the cordova PushPlugin.
I’m now trying to get Android to register categories and it seemingly does not take. It registers the installation and alias just fine but not the array of categories . Anyone encountered this? Push notifications work and are received on the android device just no categories are shown on the admin UI for the installation nor do category specific notifications get received.
* Unified Push Server on OpenShift v1.0.3
* Cordova PushPlugin v2.0.1
Any suggestions / pointers would be greatly appreciated! Thanks!
my name is Barbora Suchanova and I am working on project Keycloak. As a part of my job is to develop a simple Windows Phone application
where I am supposed to integrate authentication through Keycloak.
Anyway I have an issue with opening your solution of aerogear from GitHub for Windows 10 in new Visual Studio 2015.(update from Visual Studio 2015 RT)
Week ago I was able to open in it VS 2015 RT, but now it looks like impossible to migrate the project into VS 2015. Does anybody resolved this issue?
I would like to build it and run it and don't want to install VS 2015 RT again...
Thank you in advance.
So it looks like UPS is using a jar packaged by "theganyo"
https://github.com/theganyo/gcm-server for its Google stuff. This appears
to be a fork of Google's GCM code which was put into maven central. It is
also about two years out of date.
The fork appears to be based on the code here :
For implementing topic support I am probably going to need some
functionality from Google's actual code. Even if I don't I am going to
need things feature in neither repository (Constants for error messages in
response to topic messaging are immediately apparent).
I am looking for brainstorming around the best way to gracefully move this
functionality forward. I'm thinking drop the ganyo dependency and code and
pull the current Google code into UPS. It is apache licensed.
Thoughts, fears, tomatoes?
Hello UPS Team,
Is there a way to inject "collapse_key" attribute in GCM push messages?
We are using REST endpoint for sending push notifications.
This message may contain privileged and confidential information and is solely for the use of intended recipient. The views expressed in this email are those of the sender and not of Pine Labs. The recipient should check this email and attachments for the presence of viruses / malwares etc. Pine Labs accepts no liability for any damage caused by any virus transmitted by this email. Pine Labs may monitor and record all emails.