Skip to content
Try Hanzo
Language: English (United States)

Your screen updateswhen the data does

Live connectionOne open streamRecords arrive as they change
Client 1Connected
Client 2Connected
Client 3Connected

What the stream gives you

One connection, and the rules you already wrote deciding what goes down it

delete · bone storeAPIaccess ruleorg a · brokerorg b · brokerGET /v1/realtimegrantdeploymentsubscriptionsClient 1toldClient 2toldClient 3not told

01 / 08

One stream, server-sent

A single long-lived HTTP response carries every update, so nothing special has to sit in front of it. The browser notices a dropped network and reconnects on its own.

Open one stream and records reach the browser as they change — created, updated, deleted — with no polling loop and no timer deciding how stale a page is allowed to get. A subscription is a collection, or a single record inside it, and the access rule already guarding that collection decides what any given subscriber is allowed to receive.

subscribe
// Watch a collection
const stop = await base
  .collection('messages')
  .subscribe('*', (e) => {
    console.log(e.action, e.record.id);
    render(e.record);
  });
// create | update | delete

Build Interactive Experiences

Hanzo Realtime powers a wide range of applications that demand immediate data updates

Popular Use Cases

· · ·

Chat Applications

Build messaging apps with real-time delivery, typing indicators, and read receipts.

Collaborative Workspaces

Create shared workspaces where multiple users can collaborate simultaneously.

Collaborative Editing

Several people editing one document, each of them seeing the others' changes land as they happen.

Multiplayer Games

Develop low-latency multiplayer games with synchronized game state across players.

Live Dashboards

Build dashboards that update in real-time as new data becomes available.

Dev Tooling

Create collaborative coding environments with real-time changes and execution.

Three calls, then it is live

Mint a grant, spend it to open the stream, say what you want to hear about

  1. One authenticated request returns a string good for thirty seconds and exactly one stream

  2. Spend the grant, take the client id it hands back, then post the collections and records you care about

  3. Any create, update or delete reaches everyone watching whose rule lets them see it

The handshake, in full

There is no hidden protocol here. A grant is minted on a normal authenticated request, the stream spends it once, and the client id that comes back is how you tell the server which collections and records you want. The SDK does all three for you; the raw calls are there if you would rather do it yourself.

The wire, without the SDK

realtime.js
// 1. mint a grant on an ordinary authenticated request
const { token } = await post('/v1/realtime/token');

// 2. spend it — once, and within thirty seconds
const es = new EventSource('/v1/realtime?token=' + token);
es.addEventListener('CONNECT', (ev) => {
  const { clientId } = JSON.parse(ev.data);
  // 3. name the collections and records you want
  post('/v1/realtime', {
    clientId,
    subscriptions: [
      'messages',        // the whole collection
      'orders/ord_42',   // one record
    ],
  });
});

// records arrive as events named for the topic
es.addEventListener('messages', (ev) => {
  const { action, record } = JSON.parse(ev.data);
  if (action === 'delete') remove(record.id);
  else render(record);
});

// a grant is spent; a dropped stream reopens with a new one
es.onerror = () => reconnect();

What happens as it grows

The parts that scale, and the parts that are simply not in the way

  1. A change costs its audience

    Cost of a write

    A record is written once and handed to the subscribers already attached to it. The work is the number of people watching, not the size of the collection they are watching.

  2. A stream is a response

    Not a process, not a socket server beside the API — an HTTP response left open. They are cheap to hold, and one that goes away releases what it held without anything needing to be told.

  3. Isolated by tenant

    Blast radius

    Every org's subscribers sit on that org's own broker, over that org's own data. Adding a tenant adds a broker rather than widening a shared one, so nobody's growth is anybody else's problem.

The client asks once, not every second
No polling
A dropped stream reopens with a fresh grant
Reconnects itself
The same binary that serves the API serves the stream
Nothing extra to run

Two calls and the page keeps itself current

Mint a grant, open the stream, name a collection. No credit card to start.

Open a stream

Get Realtime

Realtime channels + presence