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

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Matthias Wessendorf
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:

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




_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Oleg Matskiv
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 ?


[1] https://aerogear.org/docs/unifiedpush/push-message-format/#query-component



On Tue, May 30, 2017 at 2:43 PM, Matthias Wessendorf <[hidden email]> 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:

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




_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
Oleg Matskiv
Associate Quality Engineer
Red Hat Mobile Application Platform
[hidden email]

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Daniel Passos-3
In reply to this post by Matthias Wessendorf


On Tue, May 30, 2017 at 9:43 AM, Matthias Wessendorf <[hidden email]> 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:

How do people feel about doing that for the alias as well ? 

I really like that idea.
 

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 ;-) 

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
-- Passos

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Summers Pittman
In reply to this post by Matthias Wessendorf


On Tue, May 30, 2017 at 8:43 AM, Matthias Wessendorf <[hidden email]> 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:

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 ? 

So there is a concept of "device groups" in FCM which are devices owned by the same logical user.  I think that might be a more interesting knob to twist than more stuff on a topic.

Also we might want to start considering how we can handle keeping notifications in sync across devices.  FCM has capabilities for sending "read receipts" to other devices to dismiss notifications that were handled on a different device and I think it leans on the device group APIs I mentioned to do that.  But this is all based on my feeble memory ;)
 

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




_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Summers Pittman
In reply to this post by Oleg Matskiv


On Tue, May 30, 2017 at 9:32 AM, Oleh Mackiv <[hidden email]> 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 ?

I think it isn't set.  Google has not been very open with the limits on the topic mechanism. (At one point there was a one million subscriber limit).  Regardless, I think we can probably beef up UPS to fall back to standard sending mechanisms if we get errors, it can eve be part of our value add.
 

On Tue, May 30, 2017 at 2:43 PM, Matthias Wessendorf <[hidden email]> 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:

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




_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
Oleg Matskiv
Associate Quality Engineer
Red Hat Mobile Application Platform
[hidden email]

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Oleg Matskiv
In reply to this post by Daniel Passos-3
I just read about the limit again, and since its per app instance(!), you can disregard my previous reply. Sorry about that.

+1 on using topics for android aliases :)

On Tue, May 30, 2017 at 3:33 PM, Daniel Passos <[hidden email]> wrote:


On Tue, May 30, 2017 at 9:43 AM, Matthias Wessendorf <[hidden email]> 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:

How do people feel about doing that for the alias as well ? 

I really like that idea.
 

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 ;-) 

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
-- Passos

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
Oleg Matskiv
Associate Quality Engineer
Red Hat Mobile Application Platform
[hidden email]

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Matthias Wessendorf
In reply to this post by Oleg Matskiv


On Tue, May 30, 2017 at 3:32 PM, Oleh Mackiv <[hidden email]> 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

that's the idea ;-)

the limit from Google is on the client. If one device subscribs itself to all users... well, there is a bug in the app.
the app itself is not rejected when assigning a token from FCM.  It's not the server 


 
- if user has multiple devices, all his devices will have same alias

that's the idea
 
- 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

through that user topic


 

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 ?

For sanity it's not documented ;-) I guess it's not that small - since major news apps in the US are using that feature to distribute pushes, for ... news topics  

On Tue, May 30, 2017 at 2:43 PM, Matthias Wessendorf <[hidden email]> 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:

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




_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
Oleg Matskiv
Associate Quality Engineer
Red Hat Mobile Application Platform
[hidden email]

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Matthias Wessendorf
In reply to this post by Daniel Passos-3


On Tue, May 30, 2017 at 3:33 PM, Daniel Passos <[hidden email]> wrote:


On Tue, May 30, 2017 at 9:43 AM, Matthias Wessendorf <[hidden email]> 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:

How do people feel about doing that for the alias as well ? 

I really like that idea.
 

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 ;-) 

Right, it's per device, not for per server-key 

Alias is usually one per device - Categories, which we are already do via topics, do definitely have more room here:
music, sports, beer, burgers, linux, jboss, and so on ;-) 


 



--
-- Passos

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Matthias Wessendorf
In reply to this post by Summers Pittman


On Tue, May 30, 2017 at 4:04 PM, Summers Pittman <[hidden email]> wrote:


On Tue, May 30, 2017 at 8:43 AM, Matthias Wessendorf <[hidden email]> 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:

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 ? 

So there is a concept of "device groups" in FCM which are devices owned by the same logical user.  I think that might be a more interesting knob to twist than more stuff on a topic.

any link ? ;-) 
 

Also we might want to start considering how we can handle keeping notifications in sync across devices.  FCM has capabilities for sending "read receipts" to other devices to dismiss notifications that were handled on a different device and I think it leans on the device group APIs I mentioned to do that.  But this is all based on my feeble memory ;)

for sure, something we could do in the future, with a new server component. i dont want ups to keep track of all of that.

ideally push just sends push... and writes status to kafka, than others read and do what they want, e.g. metrics, sync etc
 
 

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




_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Daniel Passos-3
In reply to this post by Oleg Matskiv


On Tue, May 30, 2017 at 10:32 AM, Oleh Mackiv <[hidden email]> 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
 

On Tue, May 30, 2017 at 2:43 PM, Matthias Wessendorf <[hidden email]> 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:

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




_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
Oleg Matskiv
Associate Quality Engineer
Red Hat Mobile Application Platform
[hidden email]

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
-- Passos

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Daniel Passos-3
In reply to this post by Summers Pittman


On Tue, May 30, 2017 at 11:04 AM, Summers Pittman <[hidden email]> wrote:


On Tue, May 30, 2017 at 8:43 AM, Matthias Wessendorf <[hidden email]> 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:

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 ? 

So there is a concept of "device groups" in FCM which are devices owned by the same logical user.  I think that might be a more interesting knob to twist than more stuff on a topic.

Also we might want to start considering how we can handle keeping notifications in sync across devices.  FCM has capabilities for sending "read receipts" to other devices to dismiss notifications that were handled on a different device and I think it leans on the device group APIs I mentioned to do that.  But this is all based on my feeble memory ;)


I totally forgot about that. For sure it will be a best solution specially about notify the other devices the message was already consumed
 

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




_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
-- Passos

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Daniel Passos-3
In reply to this post by Matthias Wessendorf


On Tue, May 30, 2017 at 12:27 PM, Matthias Wessendorf <[hidden email]> wrote:


On Tue, May 30, 2017 at 4:04 PM, Summers Pittman <[hidden email]> wrote:


On Tue, May 30, 2017 at 8:43 AM, Matthias Wessendorf <[hidden email]> 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:

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 ? 

So there is a concept of "device groups" in FCM which are devices owned by the same logical user.  I think that might be a more interesting knob to twist than more stuff on a topic.

any link ? ;-) 

Also we might want to start considering how we can handle keeping notifications in sync across devices.  FCM has capabilities for sending "read receipts" to other devices to dismiss notifications that were handled on a different device and I think it leans on the device group APIs I mentioned to do that.  But this is all based on my feeble memory ;)

for sure, something we could do in the future, with a new server component. i dont want ups to keep track of all of that.

ideally push just sends push... and writes status to kafka, than others read and do what they want, e.g. metrics, sync etc
 
 

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




_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
-- Passos

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Daniel Passos-3
In reply to this post by Matthias Wessendorf


On Tue, May 30, 2017 at 12:27 PM, Matthias Wessendorf <[hidden email]> wrote:


On Tue, May 30, 2017 at 4:04 PM, Summers Pittman <[hidden email]> wrote:


On Tue, May 30, 2017 at 8:43 AM, Matthias Wessendorf <[hidden email]> 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:

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 ? 

So there is a concept of "device groups" in FCM which are devices owned by the same logical user.  I think that might be a more interesting knob to twist than more stuff on a topic.

any link ? ;-) 
 

Also we might want to start considering how we can handle keeping notifications in sync across devices.  FCM has capabilities for sending "read receipts" to other devices to dismiss notifications that were handled on a different device and I think it leans on the device group APIs I mentioned to do that.  But this is all based on my feeble memory ;)

for sure, something we could do in the future, with a new server component. i dont want ups to keep track of all of that.

ideally push just sends push... and writes status to kafka, than others read and do what they want, e.g. metrics, sync etc
 
 

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




_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
-- Passos

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Summers Pittman
In reply to this post by Matthias Wessendorf


On Tue, May 30, 2017 at 11:27 AM, Matthias Wessendorf <[hidden email]> wrote:


On Tue, May 30, 2017 at 4:04 PM, Summers Pittman <[hidden email]> wrote:


On Tue, May 30, 2017 at 8:43 AM, Matthias Wessendorf <[hidden email]> 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:

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 ? 

So there is a concept of "device groups" in FCM which are devices owned by the same logical user.  I think that might be a more interesting knob to twist than more stuff on a topic.

any link ? ;-) 
 

So I think I might be overstating and misremembering, but this : https://firebase.google.com/docs/cloud-messaging/android/device-group#sending_upstream_messages_to_device_groups looks promising.  Basically if I am reading the doc right I can send a message from one device to the others using device groups, and this message could be a read receipt that closes the other notifications when it is received.
 

Also we might want to start considering how we can handle keeping notifications in sync across devices.  FCM has capabilities for sending "read receipts" to other devices to dismiss notifications that were handled on a different device and I think it leans on the device group APIs I mentioned to do that.  But this is all based on my feeble memory ;)

for sure, something we could do in the future, with a new server component. i dont want ups to keep track of all of that.

ideally push just sends push... and writes status to kafka, than others read and do what they want, e.g. metrics, sync etc
 
 

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




_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Matthias Wessendorf
In reply to this post by Daniel Passos-3


On Tue, May 30, 2017 at 6:00 PM, Daniel Passos <[hidden email]> wrote:


On Tue, May 30, 2017 at 10:32 AM, Oleh Mackiv <[hidden email]> 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 
 

 

On Tue, May 30, 2017 at 2:43 PM, Matthias Wessendorf <[hidden email]> 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:

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




_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
Oleg Matskiv
Associate Quality Engineer
Red Hat Mobile Application Platform
[hidden email]

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
-- Passos

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Daniel Passos-3
In reply to this post by Summers Pittman


On Tue, May 30, 2017 at 2:33 PM, Summers Pittman <[hidden email]> wrote:


On Tue, May 30, 2017 at 11:27 AM, Matthias Wessendorf <[hidden email]> wrote:


On Tue, May 30, 2017 at 4:04 PM, Summers Pittman <[hidden email]> wrote:


On Tue, May 30, 2017 at 8:43 AM, Matthias Wessendorf <[hidden email]> 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:

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 ? 

So there is a concept of "device groups" in FCM which are devices owned by the same logical user.  I think that might be a more interesting knob to twist than more stuff on a topic.

any link ? ;-) 
 

So I think I might be overstating and misremembering, but this : https://firebase.google.com/docs/cloud-messaging/android/device-group#sending_upstream_messages_to_device_groups looks promising.  Basically if I am reading the doc right I can send a message from one device to the others using device groups, and this message could be a read receipt that closes the other notifications when it is received.

I think you are right, it isn't some UPS should but, it's something device will do.
More detail in the video => https://youtu.be/gJatfdattno?t=675

 

Also we might want to start considering how we can handle keeping notifications in sync across devices.  FCM has capabilities for sending "read receipts" to other devices to dismiss notifications that were handled on a different device and I think it leans on the device group APIs I mentioned to do that.  But this is all based on my feeble memory ;)

for sure, something we could do in the future, with a new server component. i dont want ups to keep track of all of that.

ideally push just sends push... and writes status to kafka, than others read and do what they want, e.g. metrics, sync etc
 
 

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




_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
-- Passos

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

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

Matthias Wessendorf
Hi, all,

I've created an epic for this:

Cheers,
Matthias

On Tue, May 30, 2017 at 10:33 PM, Daniel Passos <[hidden email]> wrote:


On Tue, May 30, 2017 at 2:33 PM, Summers Pittman <[hidden email]> wrote:


On Tue, May 30, 2017 at 11:27 AM, Matthias Wessendorf <[hidden email]> wrote:


On Tue, May 30, 2017 at 4:04 PM, Summers Pittman <[hidden email]> wrote:


On Tue, May 30, 2017 at 8:43 AM, Matthias Wessendorf <[hidden email]> 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:

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 ? 

So there is a concept of "device groups" in FCM which are devices owned by the same logical user.  I think that might be a more interesting knob to twist than more stuff on a topic.

any link ? ;-) 
 

So I think I might be overstating and misremembering, but this : https://firebase.google.com/docs/cloud-messaging/android/device-group#sending_upstream_messages_to_device_groups looks promising.  Basically if I am reading the doc right I can send a message from one device to the others using device groups, and this message could be a read receipt that closes the other notifications when it is received.

I think you are right, it isn't some UPS should but, it's something device will do.
More detail in the video => https://youtu.be/gJatfdattno?t=675

 

Also we might want to start considering how we can handle keeping notifications in sync across devices.  FCM has capabilities for sending "read receipts" to other devices to dismiss notifications that were handled on a different device and I think it leans on the device group APIs I mentioned to do that.  But this is all based on my feeble memory ;)

for sure, something we could do in the future, with a new server component. i dont want ups to keep track of all of that.

ideally push just sends push... and writes status to kafka, than others read and do what they want, e.g. metrics, sync etc
 
 

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




_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
-- Passos

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev