Konstantin Antipochkin
Konstantin Antipochkin

Reputation: 219

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?

Upvotes: 11

Views: 6572

Answers (3)

Allan Spreys
Allan Spreys

Reputation: 5707

For completeness, Remote config is now providing an option to get realtime updates using Cloud Functions

https://firebase.google.com/docs/remote-config/propagate-updates-realtime

Upvotes: 1

Doug Stevenson
Doug Stevenson

Reputation: 317868

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.

Upvotes: 20

Vyacheslav
Vyacheslav

Reputation: 27221

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.

Upvotes: 3

Related Questions