All skills

Databases & Realtime

Realtime Database

Overview

Firebase Realtime Database is a cloud-hosted NoSQL database that stores data as one big JSON tree and synchronises it in real time to every connected client, with offline support built in.

How it works

js
import { getDatabase, ref, set } from "firebase/database";

set(ref(getDatabase(), "status/42"), "online");

The flow

Step by step, from source to running.

  1. 1Write JSON to a tree path
  2. 2Server pushes deltas to listeners
  3. 3Offline cache queues changes
  4. 4All clients converge in real time

Links

More in Databases & Realtime