Is firebase realtime json database suitable for da

2019-08-14 20:01发布

问题:

I am considering using firebase as a way to brodcast data messages to many connected users on mobile phone native apps running actively in the foreground.

In a "channel" (presumably a node in the database) there might be a new 1kb message every second or so and potentially thousands of users listening in.

The ideal latency should be less than a second.

Is Firebase realtime json database ideal for this use case?

What are the limitations on number of users, number of messages and latency?

How does it compare to "Google Cloud Messaging", native push notifications, or other frameworks, for the same purpose?

回答1:

  1. Firebase is a real time json data base and it would work absolutely fine for what you are requesting.

  2. There is no limitation to the number of users you can have but there is a limitation to the number of active connected users you can have. The free pricing tier allows 100 active connections at one time. The more expensive tiers allow for unlimited active connected users. There is no limitation on number of messages. Latency is very low. Changes are displayed almost instantly.

  3. I haven't personally worked with Google cloud messaging or any other real time frameworks so I can't answer that. But firebase has great documentation and is very easy to set up and implement. The only downside is that firebase do not currently provide push notifications. However they can easily be implemented with a push notification service such as Batch