Replies: 2 comments
-
Oh, wow, a blast from the far past. That's one of those projects i'd always like to return to if i could just find some use for it. (It and its parent i/o library were written for fun, not because of an acute need for them.)
epfs has always been missing one important component which would be very sorely needed for any serious usage: some sort of journaling. Back when epfs and its predecessor were written i was not confident that i could pull that off properly, so never bit that proverbial bullet.
FWIW, i see the following problems with using WASMFS as a basis, based on experience with use of it as a stepping stone early on in the sqlite project's OPFS adventure:
That said:
|
Beta Was this translation helpful? Give feedback.
-
I did consider it as a conceptual proof...
...but I didn't pursue it because I don't know much about real file systems.
Note that this restriction is no longer in Chrome, and Firefox has taken a positive position on the change. |
Beta Was this translation helpful? Give feedback.
-
An idea occurred to me, would it be possible to implement either a SQLite VFS or Emscripten WASMFS that mounted a single OPFS file that internally folds multiple files. That way it would be possible to asynchronously "mount" the file system on start then have full sync access to open and create additional files. Essentially it's a re-implementation of a low level filesystem to work around the restrictions of OPFS.
While looking into this I came across whio_epfs by @sgbeal, I'm wandering if there is a route to an epfs based Emscripten WASMFS...
For SQLite it's less of a problem as the access handle pool VFS doesn't need to hold onto more than a handful of pre-opened access handles. But for other software compiled to WASM (such as Postgres) there can be many more files needed, and the AHP trick could get out of hand.
Has anyone considered this approach already?
Obviously the downside is that it could opened by a single worker exclusively, but that's the same trade of as AHPVFS
Beta Was this translation helpful? Give feedback.
All reactions