feat: F5.5 large binary files as blobs on server F
From 16 KB a picture's or binary file's entry names its bytes by their SHA-256 instead of holding them; the bytes are on F, content-addressed (GET/POST /blobs with the session's grant, from the editor's origin, at most 16 MiB). A document's blob side says where they are: the editor's fetches and uploads, the room thread's asks F's main thread, and a start waits for the ones asked for; without a side everything stays in the document. Text stays Y.Text. A blob whose bytes are not there is never written back empty. A blob F has not got yet is asked for again a few times, and a running room reads late bytes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -191,6 +191,15 @@ export class SimulationRoom {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The bytes of blobs came (on F, after the simulation read the files
|
||||
* without them): every node's files read anew into the running engine.
|
||||
*/
|
||||
blobsArrived(): void {
|
||||
if (this.mode !== 'simulation') return;
|
||||
this.guarded(() => this.syncFiles(new Set(this.engine.state.topologySnapshot.fileSystemsByNodeId.keys())));
|
||||
}
|
||||
|
||||
/** Whether a node's files changed since they were last written back; marked written if so. */
|
||||
private takeChangedFiles(id: Id, files: { readonly revision: number } | undefined): boolean {
|
||||
const written = this.writtenFiles.get(id);
|
||||
|
||||
Reference in New Issue
Block a user