back Stop syncing everything Partial replication sounds easy—just sync the data your app needs, right? But choosing an approach is tricky: logical replication precisely tracks every change, complicating strong consistency, while physical replication avoids that complexity but requires syncing every change, even discarded ones. What if your app could combine the simplicity of physical replication with the efficiency of logical replication? That’s the key idea behind Graft, the open-source transactional storage engine I’m launching today. It’s designed specifically for lazy, partial replication with strong consistency, horizontal scalability, and object storage durability. Graft is designed with the following use cases in mind: Offline-first & mobile apps: Simplify development and improve reliability by offloading replication and storage to Graft. Cross-platform sync: Share data smoothly across devices, browsers, and platforms without vendor lock-in. Stateless multi-writer replicas: Deploy replicas anywhere, including serverless and embedded environments. Any data type: Replicate databases, files, or custom formats—all with strong consistency. I first discovered the need for Graft while building SQLSync. SQLSync is a frontend optimized database stack built on top of SQLite with a synchronization engine powered by ideas from Git and distributed systems. SQLSync makes multiplayer SQLite databases a reality, powering interactive apps that run directly in your browser. However, SQLSync replicates the entire log of changes to every client—similar to how some databases implement physical replication. While this approach works fine on servers, it’s poorly suited to the constraints of edge and browser environments. After shipping SQLSync, I decided to find a replication solution more suited to the edge. I needed something that could: Let clients sync at their own pace Sync only what they need Sync from anywhere, including the edge and offline devices Replicate arbitrary data1...
First seen: 2025-04-02 01:49
Last seen: 2025-04-02 21:53