Meta VFS for adding storage options
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 18/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, sqlite, wasm
調査の方向性
Review the issue thread and the experimental sql.js vfs branch first, since the links in the original post are stale. Read the referenced MemoryVFS.js and IndexedDbVFS.js examples alongside the SQLite VFS documentation; a complete effort would need a decided API, build strategy, asynchronous support, and adequate tests before maintainers could assess it.
索引モデルが issue の本文から書いたものです。
説明
UPDATE: Code links in this comment are stale. Check the thread for the latest info.
I have an experimental sql.js branch with changes that enable defining a SQLite VFS in Javascript. It's a platform for creating a VFS, so I've been calling it a meta-VFS. The idea is to enable more storage options in the browser, beyond the current in-memory filesystem, as has been suggested a number of times, e.g. #302.
The branch doesn't define any VFS itself, but in a separate repo I have examples of creating an in-memory VFS and an IndexedDB VFS (using it as a block device) with only Javascript. Neither is a huge amount of code, less than 350 lines for IndexedDB and no function over a page, so I think not difficult to understand.
None of this is production-ready code (mainly because of lack of testing), and the branch is not currently suitable for a pull request. But I wanted to start a discussion on whether adding something like this makes sense, and if it does how to incorporate it.
I know that the maintainers have limited time and adding multiple storage options to the code base isn't going to help with that. So my idea is to provide only the capability for storage extensions, i.e. just the meta-VFS, to allow developers to create the extensions themselves outside the scope of the project.
There are some drawbacks to this idea, among them:
- Some browser storage options have only asynchronous APIs (e.g. IndexedDB), which require using Asyncify and its signficant space and time costs. It is likely that both Asyncify and non-Asyncify builds would be needed, so at least one more build than provided now.
- SQLite is sort of a worst case for Asyncify. The .wasm file is nearly twice the size and the execution cost is said to be ~5x (plus any cost for slower storage). This may not be acceptable for many applications, and so may not be worth the effort to provide it. The future might bring native coroutines/continuations to WebAssembly, which we could just wait for.
- The current sql.js application API is synchronous. An asynchronous application API is needed to use asynchronous storage. This could be a substantial effort all by itself (and one I would rather leave to someone else).
- Splitting responsibility for a platform and its extensions can lead to support issues, like finger pointing when problems occur.
Any thoughts, especially from maintainers?
(As an aside the above mentioned branch uses Emscripten modularization to build ES6 modules, so perhaps of interest for #284 and #438.)
- 主要言語
- JavaScript
- スター
- 13.7k
- フォーク
- 1.1k
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sql-js/sql.js のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
avniproject/avni-client#2135 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bevyengine/bevy-website#2595 ·
-
ecosystem wording
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
matrix-org/matrix.org#3649 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
vadimdemedes/ink#1029 ·