Building Real-Time Multi-User Apps With JSON Patches
summary
Library released as an npm package that adds real‑time multi‑user sync to a production design tool (BuilderX) using json patches generated by Immer, with an API of createDocumentStore, a useDoc hook and setDoc callbacks. It uses Redux under the hood but avoids react‑redux by pushing updates to components listening to a document path, offers a history plugin that stores patches (not snapshots) for compact undo/redo, and a remote plugin that buffers, reorders and reconciles patches on the server with last‑write‑wins conflict resolution; experimental but working in the BuilderX product.
AI-written summary · about
chapters (10)
- 0:00Introduction to BuilderX
- 1:44Understanding JSON patches
- 4:21Benefits of patch-based storage
- 6:54Handling conflicts and sync
- 8:53Sync state library overview
- 11:18Push vs. pull strategies
- 13:37Counter example implementation
- 16:15History and undo features
- 18:26Remote multi-user syncing
- 22:45Future outlook and conclusion
related talks
42mBuilding a reactive multi user document editor in ScalaJS
24mBuilding Realtime Singlepage Apps
41mFrom single player to multiplayer-building realtime collaborative experiences with Flutter
31mEverything's better with friends
41mCreating collaborative editing UIs in React
21mWhy Real Time Matters
27mReact, But For Data
37mBuilding a Collaborative Text Editor
