refactor(workspace): blob sync (#5037)

This pr implements a blob engine.
It exposes a single `BlobStorage` to the `blocksuite`, and in it we sync blobs between multiple storages.

The implement still have few issues, but we can merge this pr first and fix them in future.

* BlobEngine currently **do nothing when delete**, because synchronization logic conflicts with deletion logic.
* BlobEngine sync between storages by querying the blob list at regular intervals. This will **cause many queries**, we can avoid this in the future by subscribing to remote changes.
This commit is contained in:
EYHN
2023-11-23 07:56:19 +00:00
parent 1740e7efa1
commit 23e0137ed8
13 changed files with 423 additions and 174 deletions

View File

@@ -22,6 +22,7 @@
"@toeverything/y-indexeddb": "workspace:*",
"async-call-rpc": "^6.3.1",
"idb": "^7.1.1",
"idb-keyval": "^6.2.1",
"is-svg": "^5.0.0",
"jotai": "^2.5.1",
"js-base64": "^3.7.5",