---
meta:
  title: "Liveblocks vs. Rocicorp Zero: shared editing and queries"
  parentTitle: "Compare"
  description:
    "Compare Liveblocks and Rocicorp Zero for shared editing, reactive queries,
    writes, and self-hosting. Understand the data model and offline boundaries."
---

Liveblocks is a realtime collaboration platform that allows you to build
multiplayer applications where users and agents can work together. It provides a
sync engine that powers shared documents, text editing, presence, and more.
Rocicorp Zero is an open-source sync engine that runs queries on the client
against a local cache of your Postgres data and sends writes through custom
mutators that run on the client and then on your server.

## Which should you choose? [#which-should-you-choose]

Zero and Liveblocks solve different problems. Zero is how your app reads and
writes application records, whereas Liveblocks is how people edit artifacts
together.

Choose Liveblocks when several people edit the same canvas, document, or board
at once and their edits need to merge without overwriting each other, such as
shapes and text on a whiteboard. Choose Zero when the client works with filtered
views of your records, such as a task list filtered by assignee and due date,
and you want those views to update instantly as rows change. Some products use
both: Zero for the records and Liveblocks for the content people edit together.

## Compare the programming model [#compare-the-programming-model]

| Area                | Liveblocks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Rocicorp Zero                                                                                                                                                                                                                                                                                                                          |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Main abstraction    | Shared documents in Storage. <InfoTooltip>A CRDT-based document store. Concurrent edits merge automatically, and data is kept until you delete it. <a href="/docs/products/sync/storage" className="font-medium text-product-brand">Learn more.</a></InfoTooltip>                                                                                                                                                                                                                          | Queries over a local cache of your Postgres data. <InfoTooltip>zero-cache replicates from Postgres and syncs the rows each client's queries need. Query results update as data changes. <a href="https://zero.rocicorp.dev/docs/introduction" className="font-medium text-product-brand">Learn more.</a></InfoTooltip>                 |
| Data on the client  | The shared document a user has opened. <InfoTooltip>The client loads a room's Storage and keeps it in sync while the room is open. <a href="/docs/api-reference/liveblocks-client" className="font-medium text-product-brand">Learn more.</a></InfoTooltip>                                                                                                                                                                                                                                | The rows your active queries need. <InfoTooltip>Queries are written in ZQL and run against the local cache, so results are instant once the data is synced. <a href="https://zero.rocicorp.dev/docs/queries" className="font-medium text-product-brand">Learn more.</a></InfoTooltip>                                                  |
| Writes              | Edits to the document from the client or from your server. <InfoTooltip>Your back end can read and modify Storage directly. <a href="/docs/products/sync/server-side-editing" className="font-medium text-product-brand">Learn more.</a></InfoTooltip>                                                                                                                                                                                                                                     | Custom mutators that run optimistically on the client, then on your server. <InfoTooltip>The client applies the change right away; your API server runs the same mutator and its result is final. <a href="https://zero.rocicorp.dev/docs/mutators" className="font-medium text-product-brand">Learn more.</a></InfoTooltip>           |
| Conflict resolution | CRDT-based. Concurrent edits to objects, lists, maps, and text merge automatically. <InfoTooltip>Writes to the same single value are last-write-wins. <a href="/docs/guides/how-conflict-resolution-works-in-liveblocks-sync" className="font-medium text-product-brand">Learn more.</a></InfoTooltip>                                                                                                                                                                                     | Your server decides. The server's result of each mutator is final, and the client's optimistic change is replaced by it.                                                                                                                                                                                                               |
| Text editing        | Built in, with Tiptap, BlockNote, Lexical, and more. <InfoTooltip>Official packages for popular editors, plus Yjs guides for others. <a href="/docs/products/sync/integrations" className="font-medium text-product-brand">Learn more.</a></InfoTooltip>                                                                                                                                                                                                                                   | Not built in. Requires a CRDT library.                                                                                                                                                                                                                                                                                                 |
| Ready-made UI       | Cursors, avatar stacks, comments, and notifications. <InfoTooltip>React components you can drop in, plus hooks for building your own. <a href="/docs/api-reference/liveblocks-react-ui#Cursors" className="font-medium text-product-brand">Cursors</a>, <a href="/docs/api-reference/liveblocks-react-ui#AvatarStack" className="font-medium text-product-brand">AvatarStack</a>, <a href="/docs/products/comments" className="font-medium text-product-brand">Comments</a>.</InfoTooltip> | None. Zero provides data bindings for React and SolidJS, not components.                                                                                                                                                                                                                                                               |
| Authentication      | Your server issues access tokens using your existing auth. <InfoTooltip>Works with any auth provider. Tokens grant access to specific rooms. <a href="/docs/api-reference/authentication" className="font-medium text-product-brand">Learn more.</a></InfoTooltip>                                                                                                                                                                                                                         | Your server issues a token, such as a JWT, that the client passes to Zero. <InfoTooltip>zero-cache verifies the token and your queries and mutators use its claims to decide what each user can read and write. <a href="https://zero.rocicorp.dev/docs/auth" className="font-medium text-product-brand">Learn more.</a></InfoTooltip> |
| Offline editing     | Edits to a loaded document are queued and sent on reconnect.                                                                                                                                                                                                                                                                                                                                                                                                                               | Reads work from synced data. Writes are rejected while disconnected. <InfoTooltip>Writes are only queued during the brief connecting state. <a href="https://zero.rocicorp.dev/docs/connection" className="font-medium text-product-brand">Learn more.</a></InfoTooltip>                                                               |
| Self-hosting        | Paid Enterprise add-on. <InfoTooltip>Run Sync on your own infrastructure. <a href="/docs/platform/data-storage#Self-hosting" className="font-medium text-product-brand">Learn more.</a></InfoTooltip>                                                                                                                                                                                                                                                                                      | Always. You run zero-cache, Postgres, and your API server. <InfoTooltip>zero-cache is a Node.js server you deploy alongside your database. <a href="https://zero.rocicorp.dev/docs/deployment" className="font-medium text-product-brand">Learn more.</a></InfoTooltip>                                                                |
| The main question   | Which parts of your app should people edit together?                                                                                                                                                                                                                                                                                                                                                                                                                                       | Which queries and mutators does the client need?                                                                                                                                                                                                                                                                                       |

## Filtered queries vs. shared documents [#filtered-queries-vs-shared-documents]

Use queries when users work across subsets of your records. Use a shared
document when people edit the same canvas, document, or workflow. For a
project-management app, the two sit side by side:

| Surface                              | Rocicorp Zero                                                                       | Liveblocks                                                                        |
| ------------------------------------ | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| My overdue tasks                     | Query the tasks matching the user and date filter. The list updates as rows change. | Keep this app-wide query in your back end.                                        |
| Reassign one task                    | A mutator changes the record and every view showing it reacts.                      | Put the field in a document only if it belongs to something people edit together. |
| Rearrange and edit a planning canvas | Not a fit on its own. You would need to add a CRDT around the records.              | Store shapes in Storage and text through an editor integration.                   |

Combining the two is application code. Give each editable field one source of
truth: records changed through
[Zero mutators](https://zero.rocicorp.dev/docs/mutators) and read through
[Zero queries](https://zero.rocicorp.dev/docs/queries), and shared content in
Liveblocks. The [canvas guide](/docs/use-cases/canvas) shows how to model a
canvas as a document.

## Does Zero support offline writes? [#does-zero-support-offline-writes]

No, not beyond brief interruptions. Zero's
[connection docs](https://zero.rocicorp.dev/docs/connection) state that it does
not support offline writes: reads keep working from synced data, but writes are
rejected while disconnected. Writes are queued only during the short connecting
state. Zero's [offline docs](https://zero.rocicorp.dev/docs/offline) explain
that this is a deliberate design choice, not a missing feature.

Liveblocks [Storage](/docs/products/sync/storage) applies edits locally right
away, queues the unconfirmed ones, and sends them when the connection returns.
This covers a document already loaded in the client; unsent edits are not kept
across a browser restart. For someone editing an open canvas through a network
drop, that is a concrete difference. If you need a durable offline database
across sessions, neither product gives you that on its own.

## Pricing and deployment [#pricing-and-deployment]

Zero is open source and
[self-hosted](https://zero.rocicorp.dev/docs/deployment). The cost is your own
infrastructure: zero-cache, Postgres, and the API server that runs your
mutators, plus support and upgrades. Liveblocks is a hosted service billed by
usage, and your application services around its documents are separate. Your
[plan's credits](/docs/pricing/plans) apply once across all Liveblocks usage.

Liveblocks offers [self-hosting](/docs/platform/data-storage#Self-hosting) as a
paid add-on on the Enterprise plan. Either way, your own servers, database,
backups, and operations are part of the budget.

## Get started [#get-started]

Open the
[whiteboard example](/examples/tldraw-whiteboard/nextjs-tldraw-whiteboard-storage)
and use the [canvas guide](/docs/use-cases/canvas) to map your editing
interactions to a shared document.

[Start building with Liveblocks for free](https://liveblocks.io/dashboard). For
self-hosting, [contact sales](/contact/sales).

---

For an overview of all available documentation, see [/llms.txt](/llms.txt).
