Automerge - CRDT Library
Basic Information
- Name: Automerge
- Founder: Martin Kleppmann (Ink & Switch)
- Official Website: https://automerge.org/
- GitHub: https://github.com/automerge/automerge
- Type: Open-source CRDT Library
- Programming Language: Rust core + JavaScript/TypeScript bindings
- License: MIT
- Positioning: Data infrastructure for local-first software
Product Description
Automerge is a CRDT library that provides JSON-like data structures, allowing different users to concurrently modify the same data structure, with changes automatically merged without conflicts. The project aims to provide persistence and synchronization mechanisms for local-first applications, much like relational databases support server applications, enabling developers to avoid directly dealing with complex distributed computing issues.
Core Features/Characteristics
- JSON-like Data Model: Supports familiar data structures like Map, List, Text, etc.
- Automatic Conflict Resolution: Concurrent changes are automatically merged without manual intervention
- Change History: Retains complete modification history, supporting time travel
- Compact Compression Format: Efficient binary serialization
- Synchronization Protocol: Efficient network synchronization protocol
- Cross-platform: Rust core + FFI bindings to multiple platforms
- Rich Text Editing: Supports collaborative text editing with cursors and marks
- Counters and Timestamps: Built-in special data types
Supported Platforms
- JavaScript/TypeScript (browser and Node.js)
- Rust (native)
- iOS (via FFI)
- Android
- Electron
- R Language Bindings (posit-dev/automerge-r)
Technical Architecture
- Core: Implemented in Rust, providing high performance and memory safety
- CRDT Algorithm: Based on RGA (Replicated Growable Array)
- Storage: Compact binary document format
- Synchronization: Efficient synchronization protocol based on Bloom filters
- Network: Supports arbitrary transport layers (WebSocket, WebRTC, HTTP, etc.)
Comparison with Yjs
- Data Model: Automerge offers a more general JSON document model; Yjs is more focused on text editing
- Performance: Yjs is faster in text editing scenarios; the gap has narrowed since Automerge 2.0
- Language Support: Automerge has broader cross-language support (Rust core + multi-language bindings)
- Use Cases: Automerge is suitable for general data synchronization; Yjs is ideal for text collaboration
Business Model
- Completely free and open-source (MIT license)
- Supported by the Ink & Switch research lab
- Academic research funding
Relationship with OpenClaw
Automerge can serve as the data synchronization layer for OpenClaw, enabling seamless synchronization of conversation history and configuration data across multiple devices. Its offline-first design aligns perfectly with OpenClaw's local operation philosophy.
Sources
External References
Learn more from these authoritative sources: