# Peter van Hardenberg - Ink and Switch, Automerge

Source: https://www.youtube.com/watch?v=9f2owS3nDHs
Recap page: https://rapidrecap.app/video/9f2owS3nDHs
Generated: 2026-01-12T08:38:00.099+00:00

---
## Quick Overview

Peter van Hardenberg details the philosophy and technical work of Ink and Switch, an independent industrial research lab focused on "tools for thought," emphasizing that local-first software, powered by synchronization engines like AutoMerge utilizing Conflict-Free Replicated Data Types (CRDTs), is crucial for achieving data ownership, offline capability, and real-time collaboration, contrasting this approach with the inherent limitations of purely cloud-based architectures.

**Key Points:**
- Local-first software mandates that software runs on the user's computer, ensuring data ownership so that "if someone can take something away from you, it's not really yours."
- The motivation for local-first research stemmed from realizing structural problems in cloud architecture, such as losing access to playlists when a phone went offline or services disappearing when Heroku scaled down old apps.
- Ink and Switch is an independent industrial research lab studying tools for thought, funded by a mix of private individuals, philanthropic contracts (like with the Endless Foundation), and government contracts (like ARIA in the UK).
- AutoMerge is a local-first sync engine that records every change made, leveraging CRDTs to ensure that merging changes from different users always yields the same result, focusing on high-fidelity history preservation like Git but in real-time.
- The technical challenge in AutoMerge involved optimizing data representation, moving from a naive byte-per-keystroke recording to a column-encoding format (similar to GIF compression), which reduced overhead to about 38% for text.
- Ink and Switch prioritizes collaboration on creative work for scientists, journalists, and writers, explicitly noting that CRDTs are not a natural fit for modeling scarcity, such as bank account balances or ticket sales.
- KeyHive is a project extending local-first principles to authentication, where authorization travels with the data via public keys, allowing servers to pass encrypted data bits to authorized parties without needing to decrypt or centrally control access.

**Context:** Peter van Hardenberg (PVH), director of the Ink and Switch research lab and co-author of the seminal local-first paper, discusses the lab's mission, which evolved from his experiences at Heroku and a growing societal concern that software architecture was failing individuals. The discussion centers on the principles of local-first software—the desire for cloud benefits like availability and collaboration combined with traditional software benefits like local control and persistence—and how their core technology, AutoMerge, addresses the synchronization challenges inherent in this model.

## Detailed Analysis

Peter van Hardenberg outlines Ink and Switch's commitment to advancing "tools for thought" in the modern ecosystem, viewing their work as carrying on the tradition started by Vannevar Bush and Doug Engelbart, aiming for a five-to-ten-year impact horizon to change software practice. The core technical solution is AutoMerge, a local-first sync engine based on CRDTs, designed to facilitate real-time collaboration while ensuring data remains on the user's machine. He contrasts the failed cloud model, exemplified by losing offline work in music apps or ephemeral cloud services, with the local-first ideal: resilience and ownership. AutoMerge achieves this by treating data changes as immutable additions, similar to Git, but enabling real-time merging using CRDT logic, though their implementation focuses on keeping high-fidelity history rather than minimizing data size. Performance optimization was critical; early prototypes suffered from N-squared performance issues with thousands of operations, which they solved by adopting a column-encoding scheme that compresses operational history efficiently, achieving only 38% overhead for complex text documents. Furthermore, they are developing KeyHive to decentralize authorization, ensuring sharing rules can be managed offline, where access rights travel with the data via public keys, inspired partly by peer-to-peer concepts like Secure Scuttlebutt. While AutoMerge excels with structured data like JSON for creative work (e.g., code editors, to-do lists), it is ill-suited for modeling scarcity, and binary file versioning remains challenging, although they are actively applying these concepts to game engines like Godot.

### Ink and Switch Mandate

- Independent industrial research lab focused on tools for thought
- Goal is to change software practice over a 5-10 year horizon
- Funded by private, philanthropic, and public contracts to maintain independence.

### Local-First Philosophy

- Software must run on the user's computer to ensure data ownership
- Combines cloud benefits (real-time collaboration, availability) with local benefits (user control, persistence if the company fails).

### AutoMerge Core Technology

- A local-first sync engine acting like a database by recording changes
- Utilizes CRDTs to guarantee convergence when merging disparate edits from multiple users asynchronously.

### Performance Optimization in AutoMerge

- Early versions suffered from memory issues with many operations
- Solved by implementing column encoding to efficiently store operation history, reducing overhead to 38% for text documents.

### Data Modeling Limitations

- AutoMerge is optimized for creative collaboration and version control (like Git but real-time)
- It is not naturally suited for modeling scarcity, such as financial transactions where absolute consistency is paramount.

### Decentralized Authentication (KeyHive)

- Moves authorization away from central servers
- Auth travels with data via public keys, allowing encrypted data transfer even if the sync server cannot decrypt the content, inspired by peer-to-peer mail systems.

### Future of Local-First

- PVH hopes local-first technology becomes foundational and taken for granted in five years
- The conversation should then shift to leveraging this ecosystem to modify existing applications (like Discord) and version non-JSON media (like Photoshop layers).

