SwirlDB: A Modular CRDT Database with Swappable Adapters for Browsers and Servers
By
owenm
Hard crust, hollow middle. Skim only.
Summary
SwirlDB is a modular-first CRDT database designed for browsers and servers, built on a philosophy where everything is an adapter rather than a monolithic system. It uses swappable adapters for storage (localStorage, IndexedDB, SQLite, etc.), synchronization (WebSocket, HTTP, WebRTC), authentication (JWT, OAuth), and encryption (AES-GCM). The system avoids feature flags and conditional compilation, with each adapter being an independent implementation of a shared trait, following a 3-crate architecture.
Key quotes
· 4 pulledEverything is an Adapter SwirlDB is not a monolith with configuration options. It's a composition of swappable adapters
No feature flags. No conditional compilation. Each adapter is an independent implementation of a shared trait
Modular-first CRDT database for browsers and servers
Storage Adapters: localStorage, IndexedDB, redb, SQLite, sharded files, or your own
You might also wanna read
Implementing PostgreSQL as a Dead Letter Queue for Event-Driven Systems: A Wayfair Case Study
This article presents a case study from Wayfair on using PostgreSQL as a Dead Letter Queue (DLQ) for event-driven systems. It explains how K
SQLite's Efficiency with Many Small Queries: Architectural Advantages Over Client/Server Databases
This article addresses criticism about SQLite's use of many small SQL queries (around 200 per dynamic page) by explaining why this approach
Implementing a Durable Execution Engine Using SQLite for Persistent Workflows
The article explores building a Durable Execution (DE) engine using SQLite, explaining how DE engines make multi-step workflows persistent a
Comparing PostgreSQL and Kafka: Understanding Their Different Use Cases in Distributed Systems
This article critiques the common trend of developers arguing that PostgreSQL can replace Apache Kafka for event streaming needs. The author
PostgreSQL as a Practical Alternative to Kafka for Small-Scale Message Queuing
The article argues against the overuse of complex messaging systems like Kafka for small-scale applications, advocating instead for PostgreS
Examining the Feasibility of Replacing Cache Services with Databases
This technical blog post explores the possibility of replacing cache services with databases, examining why caches are used (primarily for l
