Hasty Briefsbeta

Bilingual

SwirlDB: Modular-first, CRDT-based embedded database

6 months ago
  • #database
  • #modular
  • #CRDT
  • SwirlDB is a modular-first, CRDT-based embedded database built from composable adapters.
  • Browser and server are equivalent nodes with no primary platform or privileged environment.
  • Design philosophy emphasizes everything is an adapter, allowing swappable components like storage, sync, auth, and encryption adapters.
  • Core principles include adapter-first architecture, equivalent nodes, path-level policies, shared implementations, CRDT-based sync, and natural APIs.
  • Quick example demonstrates creating a database with LocalStorage persistence and using native property access via Proxies in JavaScript.
  • Architecture is based on a 3-crate system: swirldb-core (platform-agnostic Rust library), swirldb-browser (WASM bindings for browsers), and swirldb-server (pure Rust binary for servers).
  • Unified traits ensure both browser and server implement the same storage interfaces, differing only in backend implementations.