[aerogear-dev] FCM topic: use on alias as well ?

Matthias Wessendorf matzew at apache.org
Tue May 30 14:35:00 EDT 2017


On Tue, May 30, 2017 at 6:00 PM, Daniel Passos <dpassos at redhat.com> wrote:

>
>
> On Tue, May 30, 2017 at 10:32 AM, Oleh Mackiv <omatskiv at redhat.com> wrote:
>
>> Hi,
>> I think this very much depends on what is the actual limit for number of
>> topics.
>>
>> Consider this use case, that would max out topics very quickly:
>> - register alias for each user
>> - if user has multiple devices, all his devices will have same alias
>> - if you want to notify some user, you just send notification to his
>> alias and UPS will distribute it to all devices that this user has registere
>>
>> We even suggest this in docs[1]:
>> "alias: A list of one or more *identifiers* (such as email or username)
>> to send messages to *ALL* devices of the user(s)"
>>
>>
>> P.S: Do you know how much topics you can actually register before you hit
>> the "messaging/too-many-topics" error ?
>>
>
>
> There is no magic number. It will raise the max if you are "spam" the
> server :/
>
> https://stackoverflow.com/questions/38171259/maximum-
> number-of-topics-a-device-can-subscribe-to-in-fcm
>

yep, that's currently already a problem, due to each category is mapped to
one topic.
It's a responsiblity on the app developer to let the mobile app not go
crazy.

>From server point of view, it's not an issue


>
>
>
>>
>>
>> [1] https://aerogear.org/docs/unifiedpush/push-message-format/#
>> query-component
>>
>>
>>
>> On Tue, May 30, 2017 at 2:43 PM, Matthias Wessendorf <matzew at apache.org>
>> wrote:
>>
>>> Hi,
>>>
>>> on FCM related push, we do, in our client SDK, automatically subscribe a
>>> client to an annoymous topic, matching our immutable variant ID.
>>>
>>> If users are specifying categories, we do map those into topics as well.
>>>
>>> This is the related code in our Android SDK:
>>> https://github.com/aerogear/aerogear-android-push/blob/maste
>>> r/aerogear-android-push/src/main/java/org/jboss/aerogear/and
>>> roid/unifiedpush/fcm/AeroGearFCMPushRegistrar.java#L188-L193
>>>
>>> How do people feel about doing that for the alias as well ?
>>>
>>> In the past we did not do it, since topics used to be a more restricted
>>> resource. Remember, the first notion of topics (GCM v3, at that time) were
>>> even limiting the number of max. subscribers?
>>>
>>> However, that changed, and I think it would be nice if we just use the
>>> topics for each alias of the app as well. This would speed up the time to
>>> deliver the push request to the FCM backend, since the UPS would no longer
>>> need to look up the device, a push, regardless how many devices, means one
>>> small HTTP to Google, per alias (aka topic)
>>>
>>> Any thoughts ?
>>>
>>> NOTE: There is a general limit of topic abuse, but that's on the app
>>> instance (see [1]), so our APP Developers need to make sure they don't go
>>> crazy w/ a gazillion of categories ;-)
>>>
>>> -Matthias
>>>
>>>
>>> [1] https://firebase.google.com/docs/cloud-messaging/admin/errors
>>>
>>> --
>>> Matthias Wessendorf
>>>
>>> blog: http://matthiaswessendorf.wordpress.com/
>>> twitter: http://twitter.com/mwessendorf
>>>
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> aerogear-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>
>>
>>
>>
>> --
>> Oleg Matskiv
>> Associate Quality Engineer
>> Red Hat Mobile Application Platform
>> omatskiv at redhat.com
>>
>> _______________________________________________
>> aerogear-dev mailing list
>> aerogear-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>
>
>
> --
> -- Passos
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
twitter: http://twitter.com/mwessendorf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20170530/ce3c67d1/attachment-0001.html 


More information about the aerogear-dev mailing list