Push notifications: Why use Amazon SNS over Google's GCM/FCM?

后端 未结 2 1036
温柔的废话
温柔的废话 2021-01-17 11:51

I have created a mobile app for Android and iOS using Phonegap Build. Last year I had nearly finished writing code to use GCM (Google Cloud Messaging) for remote push notifi

相关标签:
2条回答
  • 2021-01-17 12:22

    Just some thoughts.

    1. If you are already using some mobile AWS SDK, then it's more convenient to use it for SNS too.
    2. That also helps keep your app smaller.
    3. And you're happier as a developer since API calls are somewhat unified.
    4. If your backend is hosted on AWS infrastructure you can use IAM roles for EC2 instances (also Lambdas etc.) to make those call without access key/secret key.
    5. You get metrics in your CloudWatch.

    But Firebase Cloud Messaging is free :)

    0 讨论(0)
  • 2021-01-17 12:44

    Let's answer a few questions first.

    1.Do you want to develop, maintain and run the code to talk to GCM?
    2.Do you wish to do the same for another platform (iOS, Kindle Fire), if you choose to develop your app for other mobile platforms.
    3.Do you want to manage change of registration_id's by yourself?
    4.Do you care if a notification is delivered to your users a few milliseconds later?
    If you answered NO to any of the questions above, I recommend using SNS to deliver push notifications to iOS, Android and Kindle Fire devices.

    SNS talks to GCM to deliver notifications to android devices. Here is what SNS can offer you.

    Simple API to send notification to heterogeneous platforms.
    Manages application registration_ids. As a developer you don't have to worry about change of registration_ids.
    Scales really well. You don't have to worry about managing infrastructure if your app becomes super popular.
    Can tolerate GCM downtime & throttling.

    0 讨论(0)
提交回复
热议问题