Firebase Remote Config - Pro Tips

Firebase Remote Config - Pro Tips

Pro tips for using Firebase Remote Config as feature-flag engine in mobile apps.

Presentation given at Seven Masters by iMasters, Firebase Edition (august / 2017).

D4b7a3e2ed10f86e0b52498713ba2601?s=128

Ubiratan Soares

August 31, 2017
Tweet

Transcript

  1. REMOTE CONFIG pro tips Ubiratan Soares August / 2017

  2. None
  3. None
  4. None
  5. None
  6. None
  7. None
  8. PRO TIPS

  9. Attention to tool limits and policies 1

  10. None
  11. Do not forget to provide the default values 2

  12. None
  13. // At application setup level FirebaseRemoteConfig .getInstance() .setDefaults(R.xml.remote_config_defaults); ➜ ~/path/to/app/main

    tree res res !"" xml !"" remote_config_defaults.xml
  14. Beware of backward compatibility for configs 3

  15. Assign values by build type per config 4

  16. Choose the proper activate / fetch strategy for configs 5

  17. Default Expires = 12h activateFetched() Async Fetching RemoteConfig SDK ACTUAL

    VALUES getXYZ() CACHED VALUES fetch(timeToCache)
  18. Are the upated values for configs needed right now ?

  19. Load values for the next time usage, at application lifecycle

    level. For non-critical configs
  20. If you cannot wait for the next interaction with your

    app … Can user wait for the actual values for configs at current app section ?
  21. Waiting for refresh Fetch and activate using callback and provide

    the proper visual feedback (usually a blocking, loading screen)
  22. If actual config values are critical for feature …

  23. Fetch and activate using callback before user interaction with remote-

    controled feature No delays accepted
  24. Find a way to override config`s local caching when needed

    6
  25. Default Expires = 12h activateFetched() Async Fetching RemoteConfig SDK ACTUAL

    VALUES getXYZ() CACHED VALUES fetch(timeToCache)
  26. Monitor application foreground / background dance and re-fetch with cache

    invalidation at transition
  27. Force a fetch with cache purging + activate using a

    push notification
  28. FINAL REMARKS • RemoteConfig is a great tool for feature-flagging

    • Deadly simple to integrate with provided SDKs • Beware of basics (default values, limitations, config compatibilities, etc) • Choose the proper fetch+activate strategy for each config
  29. UBIRATAN SOARES Computer Scientist by ICMC/USP Software Engineer, curious guy

    Google Developer Expert for Android Teacher, speaker, etc, etc
  30. THANK YOU @ubiratanfsoares ubiratansoares.github.io https://br.linkedin.com/in/ubiratanfsoares