推送通知:为什么要通过 Google 的 GCM/FCM 使用 Amazon SNS? [英] Push notifications: Why use Amazon SNS over Google's GCM/FCM?

本文介绍了推送通知:为什么要通过 Google 的 GCM/FCM 使用 Amazon SNS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Phonegap Build 创建了适用于 Android 和 iOS 的移动应用程序.去年,我几乎完成了使用 GCM(Google Cloud Messaging)进行远程推送通知的代码编写——这也可以通过 Apple 的 APNS 发送——但该项目被搁置了.

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 notifications - which can go out via Apple's APNS too - but the project was shelved.

今年该项目复活了,我发现 Google 已将所有内容更改为 Firebase (FCM).然后,我阅读了一些有关 Amazon SNS 处理通知的有趣内容.就在我开始认为 SNS 可能是更好的选择时,我注意到您仍然必须设置 GCM/FCM,并将所有这些详细信息传递给 SNS.

This year the project is resurrected and I find Google has changed everything to Firebase (FCM). I then read some enticing things about Amazon SNS handling notifications. Just when I started to think SNS might be a better option, I noticed you still have to set up GCM/FCM anyway, and pass all those details to SNS.

那么,当我还必须进行完整的 FCM 设置时,使用 SNS 有什么好处吗?!这两种服务似乎都提供相同的功能:如果需要,与 APNS 交互,订阅主题,为您提供一个很好的 API/SDK 等.应用程序代码和服务器端代码不会更简单,据我所知.为什么要在 FCM 之上添加另一个层 (SNS)?

So is there any benefit to using SNS when I've got to do the full FCM setup as well?! Both services seem to offer the same features: interact with APNS if required, subscribe to topics, provide you with a nice API/SDK, etc. The app code, and the server-side code would be no simpler, as far as I can see. Why add another layer (SNS) on top of FCM?

(我尽量不让它成为一个基于意见的问题:我想知道 SNS 是否为我节省了任何精力,给了我任何优势,或者添加了 FCM 没有的任何功能.)

推荐答案

一些想法.

  1. 如果您已经在使用某些移动 AWS SDK,那么将其用于 SNS 也更方便.
  2. 这也有助于让您的应用更小.
  3. 作为开发人员,您会更开心,因为 API 调用在某种程度上是统一的.
  4. 如果您的后端托管在 AWS 基础设施上,您可以将 IAM 角色用于 EC2 实例(还有 Lambdas 等),以便在没有访问密钥/秘密密钥的情况下进行这些调用.
  5. 您可以在 CloudWatch 中获得指标.

但 Firebase 云消息传递是免费的 :)

But Firebase Cloud Messaging is free :)

这篇关于推送通知:为什么要通过 Google 的 GCM/FCM 使用 Amazon SNS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆