Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Remote Config vs Database

I have some parameters that I want to be able to control without making an update. There are 2 options:

  1. Remote config -Fetching them with the default cache of 12 hours.
  2. Database - Making a config object and fetch it while initializing the app.

If I use remote config and change some parameter, there could be a condition that some of my users will have to wait 12 hours for the parameter change to take effect. Some of my parameters cannot be incorrect for such a long time, Does it mean that those parameters should be stored in database config object and the remote config is only for the parameters that are tolerable to stay incorrect for 12 hours?

like image 895
Konstantin Antipochkin Avatar asked Jul 09 '17 21:07

Konstantin Antipochkin


People also ask

What is Firebase remote config used for?

Remote Config gives you visibility and fine-grained control over your app's behavior and appearance so you can make changes by simply updating its configuration from the Firebase console.

Is Firebase a remote database?

The Firebase Realtime Database can be accessed directly from a mobile device or web browser; there's no need for an application server.

What is the difference between database and Firebase?

Firebase is based on a data structure used by the NoSQL database is vastly different from those used in a relational database. Some operations are faster in NoSQL than relational databases like MySQL. Data structures used by NoSQL databases can also be viewed as more flexible and scalable than relational databases.

What is the Firebase config?

Firebase Remote Config is a cloud service that lets you change the behavior and appearance of your app without requiring users to download an app update. When using Remote Config, you create in-app default values that control the behavior and appearance of your app.


2 Answers

At first glance, Firebase Remote Config looks like a simple set of key/value pairs that get pulled into your app. If that's all you need, the Remote Config isn't going to offer you anything better than Realtime Database. But it's a lot more than that if you read the feature list from link in the first sentence here.

What differentiates Remote Config from Realtime Database is the fact that you can establish conditions for parameters to configure who sees what values.

Also of note is the fact that Remote Config is tied to Google Analytics for Firebase, which means your conditions can be based off Audiences you define, and you can essentially perform A/B experiments and measure the results in the Firebase Console. This can all be done through an intuitive interface that doesn't require an engineer to operate safely (imagine giving your non-technical manager access to the Firebase Realtime Database UI to make some configuration changes).

Firebase Realtime Database doesn't have any of the features mentioned above. That said, if you don't want or need any of those features, you could still use it for simple configuration if that's easier for you.

Also note that you can change the caching behavior of Remote Config. Just take a look at the client APIs for that.

like image 188
Doug Stevenson Avatar answered Sep 21 '22 00:09

Doug Stevenson


You've misunderstood something.

This feature is used for A/B testing. This is totally incorrect to use this information as realtime storage. There is no any 'incorrect' data!

BTW, it is possible to decrease the cache time using firebaseRemoteConfig.fetch(<your_new_time_in_sec>) 10 minutes (3600 sec) is minimum

That's it!

https://firebase.google.com/docs/remote-config/ios#caching_and_throttling

https://firebase.google.com/docs/remote-config/android#caching

In your case Firebase database is better approach. Or create your own server.

like image 36
Vyacheslav Avatar answered Sep 24 '22 00:09

Vyacheslav