澄清火力地堡连接 [英] Clarify the Firebase connections

查看:174
本文介绍了澄清火力地堡连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对火力地堡定价模型有点糊涂了,特别值得关注的是连接或更多precisely并发连接。

I am a little confused about the Firebase pricing model, special concern is the connections or more precisely concurrent connections.

让我们为iOS称为FanZONE一个移动应用程序的一个例子:

Let's have an example of a mobile app for iOS called FanZONE:

用户将创建在足球比赛组。他们将在实际的游戏评论和意见会立即显示在每个成员的屏幕上。

请问这种情况意味着,谁是参加在评论/浏览次数为一个连接每一个用户?
因此,如果一组包含100个用户谁积极按照屏幕和不时的评论是有100个连接每90分钟?
什么关于谁在后台的应用程序的用户和应用程序检查每个5分钟的分数。这是连接以及90分钟或只是时间的一小部分,每5分钟?

Does this scenario means that each user who is participating on commenting/viewing counts for one connection?
So if a group contains 100 users who actively follow the screen and from time to time comment is there 100 connections each 90 minutes long?
What about users who have the app in the background and the app checks each 5 minutes the score. Is this connection as well 90 minutes long or only a fraction of time every 5 minutes?

推荐答案

在你的第一个场景 - 简单的答案是肯定的。只要用户继续在那里你有一个火力地堡连接,使他们能够发表意见的屏幕/阅读评论 - 你将有每个屏幕都有一个并发连接

In your first scenario - the short answer is yes. As long as your users keep the screen on where you have a Firebase connection that allows them to comment/read comments - you will have one concurrent connection per screen.

在你的第二个方案 - 这取决于你如何开发你的应用程序。在火力地堡API的确为您提供的 goOffline goOnline 方法(<一href="https://www.firebase.com/docs/ios-api/Classes/Firebase.html#class_methods">https://www.firebase.com/docs/ios-api/Classes/Firebase.html#class_methods)这让你控制你的连接,如果你想要去下线5分钟,然后简要回来网上查成绩,然后脱机一遍,然后你只抱了短时间的连接。

In your second scenario - this depends on how you develop your app. The Firebase API does provide you with the goOffline and goOnline methods (https://www.firebase.com/docs/ios-api/Classes/Firebase.html#class_methods) which give you control over your connection. If you want to go offline for 5 minutes, then briefly come back online to check scores and then go offline again, then you'd only hold a connection for a short duration.

并发连接是 - 在同一时间建立的连接。所以,如果你有使用你的应用程序来检查成绩3人,但用户1的应用程序进入在线状态在12:00 PM和连接持续5秒钟,然后用户2的应用程序在网上的推移,在下午12:01为5秒,用户3的应用程序在网上的推移,在下午12:02 5秒钟,然后你才过1个并发连接。

Concurrent connections are just that - connections established at the same time. So if you have 3 people using your app to check scores, but user 1's app goes online at 12:00 PM and the connection lasts for 5 seconds, then user 2's app goes online at 12:01 PM for 5 seconds, and user 3's app goes online at 12:02 PM for 5 seconds then you've only ever had 1 concurrent connection.

如果在另一方面,所有3个用户的程序都在网上12:00 PM 5秒,那么你将有3个并发连接。

If on the other hand, all 3 users' apps go online at 12:00 PM for 5 seconds then you'll have 3 concurrent connections.

您可能使用同样的goOffline / goOnline战略,你的第一个方案,但可能从经验中,如果您的用户希望将聊起游戏中近乎实时的损害。

You could potentially use this same goOffline/goOnline strategy with your first scenario, but that may detract from the experience if your users are expecting to be chatting about a game in near real-time.

这篇关于澄清火力地堡连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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