如何与亚马逊 (sqs/sns) 或 azure 等云服务同步移动应用程序
我想实现几个移动应用程序(Windows Phone/iOS/Android)的想法。其中大多数需要在其他设备组上获取用户数据更新。
例如, 1 不需要立即更新发送到群的场景: 假设家庭成员可以在应用程序中跟踪他们的支出。新添加的费用将自动同步到其他家庭成员设备(或在他们选择同步时手动同步)。
需要立即将更新发送到组的第二种情况: 让我们考虑一下所有的纸牌游戏 或者在二十一点的游戏场景中,我们需要通知牌桌上的所有玩家庄家为他们每个人开了哪张牌。
问:我开始寻找 Amazon SQS(队列)、SNS(通知)服务。但初步阅读并没有让我得出任何结论。我也要去读Azure。
哪些服务可以帮助我实现上述场景?
SQS 问题:SQS 将如何运作?如果我从队列中读取一项,我猜测它将从队列中删除。因此,如果一台设备添加了新费用,系列中的其他设备则不会,因为项目已从队列中删除。或者可能是 - 我是否只为每个设备创建一个队列? (也许我最后的额外代码逻辑可以帮助我)。
请向我提供有关这些服务的任何见解。
谢谢
I want to implement couple of mobile app (windows phone/iOS/android) ideas. Most of them require getting user data updates on other group of devices.
For example,
1 scenario which does not need immediate update sent to the group:
let's say a family member can track their expenses in the app. Newly added expense will automatically be synced to other family member devices automatically (or manually when they choose to sync).
2nd scenario which requires immediate update sent to the group:
Let's consider all the cards games
Or in a game scenario of blackjack, we need to notify all the players on the table about which card did the dealer open for each of them.
Question: I have started looking Amazon SQS(queue), SNS (notification) services. But initial reading did not get me to any conclusion yet. I am also going to read Azure.
What service(s) should help me achieve above scenarios?
SQS question: How will SQS work? If I read one item from the queue, I am guessing it will be removed from queue. So, if one device gets the new expense added, other devices in the family won't, because item was removed from the queue. Or may be - Do I just create one queue per device? (May be additional code logic at my end can help me).
Please provide me any insights into these services.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
很难回答的问题,也有点具体。答案是那句著名的建筑名言:“视情况而定”。我可以帮助您解决 Azure 部分,并且我确信它也可以以某种方式翻译到 Amazon。
让我们看看您的场景。
GetFamilyExpenses(familyId);
之类的方法或(2) 在 Azure 上使用 AppFabric(a虽然有点贵)用于身份验证和直接访问表存储。更新在您的应用程序内部处理...这是我看到的 Azure 选项的基本概述。如果对您有帮助,请不要忘记点赞/标记为答案。
Tough question to answer, a bit specific too. The answer is that famous architectural quote, "it depends". I can help you out with the Azure part, and I'm sure it can be somehow translated to Amazon as well.
Let's take a look at your scenarios.
GetFamilyExpenses(familyId);
or (2) use AppFabric on Azure (a bit expensive though) for authentication and access table storage directly. The updates are handled inside your application...That's a basic overview of the options I see you have with Azure. Please don't forget to upvote/mark as answer, if it helps you out.