Rebasely Beta: data may be purged

exampleslive-notes Public

Save a snapshot of each note to R2 every 100 versions #2

Changed files

21 files changed470 additions41 deletionssince main at d21dfdd

An edit reaching other editors

1 step added, description changed

  • Added
  • Rerouted, relabelled or moved
  • Removed

Editor A types while editor B has the same note open. The room puts the edit in order, saves it and passes it on. Every 100th version it also copies the note to R2.

An edit reaching other editors: 7 steps between 5 participants Step 1: editor-a to note-room, op: insert "oat " at 4, written against version 41op: insert "oat " at 4, writt…Step 2: note-room to ops, transform the op past versions 42 and 43 from the logtransform the op past version…Step 3: ops to note-room, the op as it applies now, which the room saves to SQLitethe op as it applies now, whi…Step 4: note-room to editor-a, ack: version 44ack: version 44Step 5: note-room to editor-b, the transformed op at version 44the transformed op at version 44Step 6: note-room to snapshots, every 100 versions: put the note's text, after the replies (added)every 100 versions: put the note's text, after the repliesStep 7: editor-b to ops, move the op past B's own unacknowledged edits, then apply itmove the op past B's own unac…editor-aeditor-aActornote-roomnote-roomDurable ObjectopsopsLibraryeditor-beditor-bActorsnapshots (added in this flow)snapshotsR2 bucket · added

The flow edit-broadcast at the head of this pull request, numbered in its order, with the steps it adds, reroutes, relabels, moves and removes. A removed step has no number.

Steps

  1. Step 1: editor-a → note-room op: insert "oat " at 4, written against version 41
  2. Step 2: note-room → ops transform the op past versions 42 and 43 from the log
  3. Step 3: ops → note-room the op as it applies now, which the room saves to SQLite
  4. Step 4: note-room → editor-a ack: version 44
  5. Step 5: note-room → editor-b the transformed op at version 44
  6. Step 6, added: note-room → snapshots every 100 versions: put the note's text, after the replies Added
  7. Step 7: editor-b → ops move the op past B's own unacknowledged edits, then apply it

The flow's description changed too.

Knowledge base

Back to the conversation