mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
feat(durable): replicate storages as a commit log
Every built-in storage implements ReplayableStorage: head(), replay() at an explicit sequence, and export() of the current state as a log that replays to the same reads. SQLite schema version 3 adds sequence indexes so export streams. @earendil-works/pi-durable/sync adds ReplicatingStorage, which appends each committed batch to an outbox with fork copies resolved, compactRecords(), and versioned JSON log lines.
This commit is contained in:
parent
89e309581b
commit
4c25119f54
24 changed files with 1586 additions and 33 deletions
|
|
@ -60,6 +60,12 @@
|
|||
"import": "./dist/images/cloudflare.js",
|
||||
"default": "./dist/images/cloudflare.js"
|
||||
},
|
||||
"./sync": {
|
||||
"source": "./src/sync/index.ts",
|
||||
"types": "./dist/sync/index.d.ts",
|
||||
"import": "./dist/sync/index.js",
|
||||
"default": "./dist/sync/index.js"
|
||||
},
|
||||
"./storage/memory": {
|
||||
"source": "./src/storage/memory.ts",
|
||||
"types": "./dist/storage/memory.d.ts",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue