2

I read a couple of articles where it is explained nicely how push notifications in iOS work. Recently I came across FCM & FCM with SNS. We already have a number of modules in the backend which use AWS SNS to push the notifications. So, in this case, it only makes sense that we don't replace AWS SNS with FCM but instead make SNS hit FCM endpoint and then FCM can contact APNS to push the notifications to the app.

  • Does it make sense?

  • What would be an ideal scenario? (Since we are using FCM should we not use SNS at all as both are push notification services? - Shouldn't we use either of these instead of both of these)

  • Can anyone explain with a basic diagram - how the picture will change when FCM is added?

Primarily, we are interested in the analytics provided by FCM.

ReyAnthonyRenacia
  • 17,219
  • 5
  • 37
  • 56
A_G
  • 2,260
  • 3
  • 23
  • 56

2 Answers2

7

AFAIK, FCM communicates with APNs in the background to send the notifs to iOS devices. So using FCM with SNS would make your push flow lile this:

 Your Server > SNS > FCM > APNs > Client App

Does it make sense? This is a looong flow to just push notifications. It also gives a higher risk that the notification would fail -- if one of the services fail.

What would be an ideal scenario?

This is a bit broad. It all depends on your use-case. If what you have with SNS works fine, then stick with it. Using it with FCM is still possible. If you really want to take advantage of the Analytics FCM offers, then go with it. Guess it depends how much you want the feature (and is it worth the time to implement and the risk as I mentioned).

Can anyone explain with a basic diagram - how the picture will change when FCM is added?

I think the diagram above should cover this.

AL.
  • 36,815
  • 10
  • 142
  • 281
0

FCM solves a very specific problem of communication with Android. SNS covers a lot of other channels like email, SMS etc. So, yes it does make sense to use both of them, for some particular use cases.

For diagram, you can refer to this blog post

N. S. Mehra
  • 45
  • 1
  • 1
  • 5