---
title: "Offline-first, multiplayer SQLite"
url: "https://aaronfrancis.com/videos/offline-first-multiplayer-sqlite"
path: "/videos/offline-first-multiplayer-sqlite"
type: video
author: Aaron Francis
published: 2024-06-10
topic: Databases
keywords: [sqlsync, offline-first, multiplayer sqlite, collaborative sqlite, sqlite replication, event sourcing, conflict resolution, local-first, sqlite vfs, durable objects, carl sverre, orbiting hail]
youtube_url: "https://www.youtube.com/watch?v=R-Laxph9tQ4"
chunked: true
full_bytes: 108182
section_count: 20
full_url: "/videos/offline-first-multiplayer-sqlite/full.md"
site_index: "/llms.txt"
keyword_index: "/llms/keywords.txt"
---

# Offline-first, multiplayer SQLite

## Sections (105.6 KB full document — follow any link to read verbatim)

This page is long enough to hit agent truncation cliffs if fetched all at once. Pick the section matching your question below to read it 100% verbatim (< 35 KB each), or open the [full unsplit document (105.6 KB)](/videos/offline-first-multiplayer-sqlite/full.md).

### 1. Intro and Background (00:02–02:19 · 2.8 KB)
Carl Sverre spent 10 years at SingleStore (formerly MemSQL) building a high-performance analytics/transactions database, then left to join Amplify as an entrepreneur-in-residence to explore data and databases, launching SQLSync as a multiplayer SQLite wrapper.
Keywords: `singlestore`, `sqlite`, `amplify partners`, `sqlsync`, `intro`, `background`, `sverre`, `company`
[Read section 1 verbatim](/videos/offline-first-multiplayer-sqlite/sections/1-intro-and-background.md)

### 2. What is SQLSync (02:21–02:43 · 0.4 KB)
SQLSync is a vanilla SQLite wrapper implementing multiplayer functionality so multiple browser tabs or apps can collaborate through a central SQLite database.
Keywords: `sqlsync`, `singlestore`, `knew`
[Read section 2 verbatim](/videos/offline-first-multiplayer-sqlite/sections/2-what-is-sqlsync.md)

### 3. Amplify (02:44–05:27 · 3.6 KB)
Carl started conversations with Amplify VC two years before leaving SingleStore and joined their entrepreneur-in-residence program to explore new ideas with dedicated time and resources without full company commitment.
Keywords: `singlestore`, `webassembly`, `amplify`, `sverre`, `mm-hmm`, `entrepreneur`, `residence`, `sqlsync`
[Read section 3 verbatim](/videos/offline-first-multiplayer-sqlite/sections/3-amplify.md)

### 4. SQLSync Use Case (05:27–07:40 · 2.9 KB)
SQLSync aims to simplify multiplayer web apps with relational data by keeping vanilla SQLite, making multiplayer reasoning simpler, and offering an alternative to systems like ElectricSQL/Turso.
Keywords: `sqlsync`, `sqlite`, `electricsql`, `sverre`, `mm-hmm`, `multiplayer web`, `multiplayer`, `companies`
[Read section 4 verbatim](/videos/offline-first-multiplayer-sqlite/sections/4-sqlsync-use-case.md)

### 5. Multiplayer Explained (07:41–09:41 · 2.7 KB)
PartyKit handles transport/messaging for multiplayer apps via Cloudflare Durable Objects, while SQLSync is a higher-level, more opinionated abstraction that could theoretically run on top of PartyKit.
Keywords: `multiplayer`, `multiplayer explained`, `explained`, `sverre`, `different clients`, `partykit`, `server`, `clients`
[Read section 5 verbatim](/videos/offline-first-multiplayer-sqlite/sections/5-multiplayer-explained.md)

### 6. Durable Objects (09:42–12:00 · 3.3 KB)
Cloudflare Durable Objects provide the infrastructure for durable, stateful serverless backends; SQLSync uses them to allocate one durable object per SQLite database as the authoritative source of truth for multiplayer coordination.
Keywords: `durable objects`, `cloudflare durable`, `sqlsync`, `durable`, `objects`, `sverre`, `to-do app`, `partykit`
[Read section 6 verbatim](/videos/offline-first-multiplayer-sqlite/sections/6-durable-objects.md)

### 7. Compare to PartyKit (12:00–13:07 · 1.5 KB)
PartyKit is a lower-level abstraction over Durable Objects for managing shared objects and connections, while SQLSync is higher-level and more opinionated, handling data structures and conflict management automatically.
Keywords: `partykit`, `compare`, `sql sync`, `sverre`, `sql`, `sync`, `sounds`, `objects`
[Read section 7 verbatim](/videos/offline-first-multiplayer-sqlite/sections/7-compare-to-partykit.md)

### 8. Local First (13:08–22:58 · 12.4 KB)
SQLSync uses a local-first architecture with SQLite databases in browsers coordinating through a central coordinator durable object, tracking committed state and local changes separately to maintain logical consistency.
Keywords: `sqlite`, `javascript`, `sverre`, `data structure`, `sql sync`, `conflict handling`, `mm-hmm`, `physical`
[Read section 8 verbatim](/videos/offline-first-multiplayer-sqlite/sections/8-local-first.md)

### 9. SQLSync Terminology (22:58–24:33 · 2.2 KB)
SQLSync terminology: a 'client' runs in browser tabs executing local SQLite operations, a 'coordinator' runs in a Cloudflare Durable Object managing one SQLite database as authoritative, with many clients connecting to one coordinator.
Keywords: `sqlsync`, `sqlite`, `sqlsync terminology`, `terminology`, `sverre`, `sql sync`, `coordinator`, `sqlite database`
[Read section 9 verbatim](/videos/offline-first-multiplayer-sqlite/sections/9-sqlsync-terminology.md)

### 10. SQLSync Replication Flow (24:33–27:50 · 4.5 KB)
SQLSync replication starts with local mutations creating immediate database changes in the client's SQLite, tracks them in a local log, then sends mutation names and arguments to the coordinator for ordering and application.
Keywords: `replication flow`, `sqlite`, `sqlsync`, `sqlsync replication`, `replication`, `sql sync`, `sverre`, `sqlite database`
[Read section 10 verbatim](/videos/offline-first-multiplayer-sqlite/sections/10-sqlsync-replication-flow.md)

### 11. Virtual File System (27:50–33:53 · 7.4 KB)
SQLSync intercepts SQLite's disk writes via a custom VFS (Virtual File System) layer, allowing clients to track changes and present a normal filesystem abstraction to SQLite while performing custom operations on the data.
Keywords: `sqlite`, `file system`, `file`, `system`, `virtual file`, `sqlsync`, `virtual`, `sverre`
[Read section 11 verbatim](/videos/offline-first-multiplayer-sqlite/sections/11-virtual-file-system.md)

### 12. Transactions in WASM (33:54–39:40 · 7.7 KB)
SQLSync forces all transactions to run as WebAssembly mutators in both clients and coordinator, preventing direct SQLite access and enabling reproducible conflict resolution by replaying the same mutation code on all versions of the database.
Keywords: `webassembly`, `sqlite`, `sqlsync`, `javascript`, `transactions`, `wasm`, `sverre`, `mm-hmm`
[Read section 12 verbatim](/videos/offline-first-multiplayer-sqlite/sections/12-transactions-in-wasm.md)

### 13. Sync to Coordinator (39:41–43:21 · 5.3 KB)
Client mutations are logged by name and arguments, sent to the coordinator which creates a global ordered log of all mutations, applies them to its authoritative SQLite database using the same WebAssembly mutators to handle conflicts consistently.
Keywords: `coordinator`, `sqlite`, `webassembly`, `sync`, `sverre`, `log`, `mm-hmm`, `database`
[Read section 13 verbatim](/videos/offline-first-multiplayer-sqlite/sections/13-sync-to-coordinator.md)

### 14. Conflict Resolution as Business Logic (43:22–52:02 · 11.4 KB)
SQLSync treats conflict resolution as application business logic rather than automatic conflict handling, forcing developers to implement resolution in WebAssembly mutators since the same code runs locally and at the coordinator.
Keywords: `business logic`, `conflict resolution`, `conflict`, `sqlite`, `webassembly`, `logic`, `sqlsync`, `resolution`
[Read section 14 verbatim](/videos/offline-first-multiplayer-sqlite/sections/14-conflict-resolution-as-business-logic.md)

### 15. Sync to Clients (52:03–1:01:15 · 11.8 KB)
Coordinator sends raw byte-level diffs to clients, clients apply diffs to discard local changes and replay mutations above the coordinator's last-seen ID, using a hidden table to track committed state and coordination progress.
Keywords: `sqlite`, `sqlsync`, `clients`, `sverre`, `sync`, `coordinator`, `mm-hmm`, `dozen events`
[Read section 15 verbatim](/videos/offline-first-multiplayer-sqlite/sections/15-sync-to-clients.md)

### 16. Goals for SQLSync (1:01:15–1:04:19 · 3.8 KB)
SQLSync maintains vanilla SQLite by never modifying its internal data structures or B-tree management, working entirely through external VFS layer and WebAssembly wrappers without touching SQLite's physical layer.
Keywords: `sqlsync`, `sqlite`, `goals`, `sverre`, `vanilla sqlite`, `data structures`, `vanilla`, `data`
[Read section 16 verbatim](/videos/offline-first-multiplayer-sqlite/sections/16-goals-for-sqlsync.md)

### 17. Scaling Limitations (1:04:20–1:07:44 · 4.8 KB)
SQLSync currently requires full database copies on clients and coordinator, working well for megabyte-sized databases but struggling above gigabyte scale; future improvements include JavaScript mutators and better WebAssembly developer experience.
Keywords: `sqlsync`, `javascript`, `scaling limitations`, `webassembly`, `limitations`, `scaling`, `sverre`, `mm-hmm`
[Read section 17 verbatim](/videos/offline-first-multiplayer-sqlite/sections/17-scaling-limitations.md)

### 18. Graft Storage Engine (1:07:45–1:14:53 · 8.5 KB)
Graft is a new storage engine Carl is building to replace SQLSync's VFS layer, using efficient internet-synchronization data structures to send only changed bytes instead of full diffs, addressing SQLSync's scaling limitations.
Keywords: `sqlsync`, `storage engine`, `graft`, `storage`, `engine`, `graft storage`, `sqlite`, `sverre`
[Read section 18 verbatim](/videos/offline-first-multiplayer-sqlite/sections/18-graft-storage-engine.md)

### 19. Graft as a SQLite Extension (1:14:54–1:17:27 · 3.2 KB)
Graft will be built as a native SQLite extension enabling high-performance replication, with SQLSync becoming a lightweight layer on top, making it easier to port to desktop and mobile apps alongside browser use.
Keywords: `sqlite`, `sqlsync`, `sqlite extension`, `graft`, `extension`, `sverre`, `native sqlite`, `mm-hmm`
[Read section 19 verbatim](/videos/offline-first-multiplayer-sqlite/sections/19-graft-as-a-sqlite-extension.md)

### 20. What's Next (1:17:27–1:21:23 · 5.6 KB)
Carl's immediate goal is making SQLSync production-ready rather than a toy, with medium-term plans to build a real product on top of it and explore desktop/mobile applications, available at sqlsync.dev with Discord community support.
Keywords: `sqlsync`, `sverre`, `goal`, `mm-hmm`, `graft`, `medium term`, `term goal`, `building graft`
[Read section 20 verbatim](/videos/offline-first-multiplayer-sqlite/sections/20-whats-next.md)

---

## Related on aaronfrancis.com

- [From Prisma Founder to LiveStore: Building local-first apps with Johannes Schickling](/videos/from-prisma-founder-to-livestore-building-local-first-apps-with-johannes-schickling) *(Video · 2025-05-29 · shared: local-first, event sourcing)*
- [Building a serverless database replica with Carl Sverre](/videos/building-a-serverless-database-replica-with-carl-sverre) *(Video · 2025-04-18 · shared: carl sverre, multiplayer sqlite)*
- [Scope Explosion](/podcast/scope-explosion-3ceefda7) *(Podcast · 2026-04-07 · shared: durable objects)*
- [Mostly NPTM with Caleb Porzio & Daniel Coulbourne](/podcast/mostly-nptm-with-caleb-porzio-daniel-coulbourne-360ca322) *(Podcast · 2024-08-20 · shared: event sourcing)*
- [Jank Free With Caleb Porzio](/podcast/jank-free-with-caleb-porzio-dc37069f) *(Podcast · 2024-08-13 · shared: event sourcing)*

## Relevant Resources from Aaron Francis

- **[MySQL for Developers](https://databaseschool.com)** (overview on site: [/courses](/courses)): Full video course covering MySQL indexing, deferred joins, pagination, query plans, and schema design for application developers.
- **[High Performance SQLite](https://databaseschool.com)** (overview on site: [/courses](/courses)): Comprehensive video course on running SQLite in production: WAL mode, concurrency, FTS5, strict tables, backups, and performance tuning.

## Search aaronfrancis.com (2-Hop Static Keyword Index)

Pick the alphabetical shard matching any topic to find exact pages across all articles, newsletters, videos, talks, and podcast transcripts (every shard is < 40 KB):
[A-B](/llms/keywords/a-b.txt) · [C](/llms/keywords/c.txt) · [D-E](/llms/keywords/d-e.txt) · [F-G](/llms/keywords/f-g.txt) · [H-J](/llms/keywords/h-j.txt) · [K-L](/llms/keywords/k-l.txt) · [M-N](/llms/keywords/m-n.txt) · [O-P](/llms/keywords/o-p.txt) · [Q-R](/llms/keywords/q-r.txt) · [S](/llms/keywords/s.txt) · [T-Z](/llms/keywords/t-z.txt) · [Directory](/llms/keywords.txt) · [Site Map](/llms.txt)

Shards for this page's topics: `sqlsync` ([S](/llms/keywords/s.txt)), `offline-first` ([O-P](/llms/keywords/o-p.txt)), `multiplayer sqlite` ([M-N](/llms/keywords/m-n.txt)), `collaborative sqlite` ([C](/llms/keywords/c.txt)).

## About Aaron Francis (Current Context)

Aaron Francis is VP of Marketing and Community at [Laravel](https://laravel.com), founder of [Try Hard Studios](https://tryhardstudios.com), creator of [Solo](https://soloterm.com), co-host of [Mostly Technical](/podcast), and author of [Mastering Postgres](/courses), [High Performance SQLite](/courses), [MySQL for Developers](/courses), and [Screencasting.com](/courses). Full bio: [/about](/about) · Current focus: [/now](/now).
