Live queries, not polling.
db.useQuery is a WebSocket subscription. Pylon walks the change log on every write and pushes the exact diff to every client that's watching. No polling loops, no cache invalidation, no stale UI.
import { db } from "@pylonsync/react";
function Messages({ roomId }: { roomId: string }) {
// A live subscription. Re-renders the instant anyone,
// anywhere, inserts or edits a matching Message row.
const { data: messages } = db.useQuery<Message>("Message", {
where: { roomId },
});
return messages.map((m) => <Bubble key={m.id} message={m} />);
}- Subscriptions update in milliseconds — the server pushes diffs, clients don't poll
- Local-first: reads hit an in-browser store, writes apply optimistically and reconcile
- Offline-ready — queue mutations offline, they sync when the connection returns
- Multi-tab coherent via a leader election over BroadcastChannel
The server computes the diff
On every write, Pylon walks an append-only change log and figures out exactly which subscriptions are affected and how their result set changed. Clients receive a minimal delta — an insert, an update, a tombstone — not a re-fetch. That's why a 10,000-row table updates as cheaply as a 10-row one.
Optimistic by default, consistent always
Mutations apply locally before the round-trip so the UI never waits on the network. The engine tracks each pending op, reconciles against the authoritative server state when the ack lands, and rolls back cleanly if a policy rejects the write. Race conditions that plague hand-rolled optimistic UIs are handled in one place.
One engine, every client
The same sync protocol drives the TypeScript engine in the browser and the Swift engine on iOS and Mac. Both speak the same wire format, hold the same guarantees, and stay at feature parity — so your web app and your native app see the same data the same way.
Build it on Pylon.
One framework for your schema, sync, auth, functions, realtime, and SSR. Free to start.