Firebase Remote Config vs Database
Asked Answered
O

3

11

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?

Ovoid answered 9/7, 2017 at 21:16 Comment(0)
H
20

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.

Holloweyed answered 9/7, 2017 at 22:19 Comment(2)
How and where the Firebase Remote Config object is stored. It looks like an in memory object but behaves like database as well. Is it stored at a particular location externally where we can see it?Sunday
@VrushabMaitri The only supported way of getting remote config data is through the provided client APIs.Holloweyed
B
3

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.

Badger answered 9/7, 2017 at 21:37 Comment(0)
L
1

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

Litigation answered 18/7, 2019 at 2:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.