Event

Event
14:00
-
14:25
Day 2
SQLRooms: Local-First Analytics with DuckDB, Collaborative Canvas, and Loro CRDT Sync
K.3.201
English
<p><a href="https://sqlrooms.org">SQLRooms</a> (<a href="https://github.com/sqlrooms/sqlrooms">GitHub</a>) is an open-source React framework for building local-first data analytics applications powered by <a href="https://duckdb.org">DuckDB</a>. SQLRooms can run entirely in the browser using DuckDB-WASM, or connect to a shared session-backend running native DuckDB for larger datasets—in both cases, enabling privacy-preserving analytics where data stays under user control.</p> <p>In this talk, I'll present SQLRooms' local-first architecture and our ongoing work on real-time collaboration using <a href="https://loro.dev">Loro CRDT</a>. We're building a Canvas module with SQL query cells and <a href="https://vega.github.io/vega-lite/">Vega-Lite</a> visualization cells, a Notebooks module, and an underlying DAG (directed acyclic graph) engine that tracks dependencies between cells—automatically re-executing downstream cells when data changes. These modules will support collaborative editing via <code>@sqlrooms/crdt</code>, with sync enabled through WebSockets using <a href="https://pypi.org/project/sqlrooms-duckdb-server/">sqlrooms-duckdb-server</a>.</p> <p>A key insight for analytics apps: DuckDB serves as a read-only query engine—the underlying data doesn't need to be synced. Only the UI state requires CRDT synchronization: queries, notebooks, canvas layouts, annotations, and comments. This CRDT state can be persisted both in a shared session-backend DuckDB and on local machines for offline access.</p> <p>For session-backend deployments, sqlrooms-duckdb-server provides a shared DuckDB instance where all connected clients query the same data—useful for large datasets or when consistent results matter. This can be deployed with e.g. <a href="https://developers.cloudflare.com/containers/">Cloudflare Containers</a> for on-demand, per-session instances.</p> <p>I'll discuss our choice of Loro over Yjs and how separating data (read-only DuckDB) from collaborative state (CRDT) simplifies the sync architecture while enabling privacy-preserving collaborative analytics.</p>