Skip to content

joodaloop/sssync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sssync: Simple Stateless Sync

WARNING: THIS IS NOWHERE NEAR DONE

Sync protocol

  • Client can make requests to an endpoint that returns snapshots for named functions + argument combos
  • Server is responsible for sending client a delta stream of updates
  • Client writes to local cache and server using named + typed events

Open questions

  • Provide both IVM and non-IVM versions?
  • How to support SSR + incognito usage?
  • Provide both IDB (sync) and SQLite (async) versions?
  • Semantics around temporary fetch vs. persist results
  • Use route metadata to choose loader strategy (workspace, cold-bootstrap, public/share)?
  • Can we combine online and offline edits? Rollback?
  • When resetting local state, can we download server state first, then swap over?

nice-to-haves

  • Undo-redo support
  • Expose cache clearance
  • Full-text search (use FTS5)
  • UI state persistence (with screen width options)
  • Design schema management + migration system
  • Query lifecycles
  • Sync status + metadata + satisfied queries
  • Devtools with test modes
  • Update batching API (for sliders)
  • Preloading API (like Linear?)
  • Event => UI mapping for toasts
  • Persistent (and typed) client-only stores
  • Images handling, like icons (https://colanode.com/blog/emojis-icons-offline-with-sqlite/)
  • Offline-capable blob uploads (https://docs.powersync.com/client-sdks/advanced/attachments)
  • Data seeding
  • Simulate bugs through double sending, out of order handling
  • Request delaying to test loading UI
  • Semantic annotation layer to events
  • Rewind

speculative

  • Build a SQLite-only server-side zero-cache that the client can request data from, but queries run just once and delta sync does the rest

About

Sync for the rest of us

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages