Skip to content

Firebase

Firebase Realtime Database is a realtime database provided by Google as part of the broader Firebase mobile/web app development platform.
From backend's point of view we only use the Realtime Database, and by tradition and as shorthand the database is called just "Firebase".

Usage guidelines

  • Since Firebase is used by Apps, any changes must be backwards compatible.
  • Firebase is not the owner of any data. Each area should only store copies of its data in Firebase, the source of truth is in its own (SQL) DB.
  • Firebase can be used to signal to apps that something has happened/changed. Because of its real-time feature, an opened app will receive the change in (more or less) real-time.
  • Firebase can also store data.
  • The data structure must be carefully designed to support efficient querying by the Android/IOS apps.
    • Typically apps subscribe to certain nodes
    • The firebase database only provides limited indexing (only a single index possible).

Structure

Root for most things: /user/{userid}/.

/user/{userid}/
              /{area-name?}/....