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

Loading a note

Not changed by this pull request.

  • Added
  • Rerouted, relabelled or moved
  • Removed

Someone opens /#groceries. The page connects to the note's room and gets its text.

Loading a note: 5 steps between 3 participants Step 1: editor-a to api, GET / (the editor page and its script, from static assets)GET / (the editor page and it…Step 2: editor-a to api, GET /notes/groceries/ws, Upgrade: websocketGET /notes/groceries/ws, Upgr…Step 3: api to note-room, forward the upgrade to the room for idFromName("groceries")forward the upgrade to the ro…Step 4: note-room to editor-a, 101 Switching Protocols, socket accepted for hibernation101 Switching Protocols, socket accepted for…Step 5: note-room to editor-a, snapshot: the note's text and versionsnapshot: the note's text and versioneditor-aeditor-aActorapiapiWorkernote-roomnote-roomDurable Object

The flow load-note 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 → api GET / (the editor page and its script, from static assets)
  2. Step 2: editor-a → api GET /notes/groceries/ws, Upgrade: websocket
  3. Step 3: api → note-room forward the upgrade to the room for idFromName("groceries")
  4. Step 4: note-room → editor-a 101 Switching Protocols, socket accepted for hibernation
  5. Step 5: note-room → editor-a snapshot: the note's text and version

Knowledge base

Back to the conversation