wasm-forge / stable-fs

File system implementation for the Internet Computer
MIT License
7 stars 2 forks source link

New feature: enable accessing user custom virtual memories from a file. #14

Closed wasm-forge closed 1 month ago

wasm-forge commented 2 months ago

Idea: The new ic-polyfill function mounts some virtual memory in the file system. Whenever a user tries to read or write in this file, the read and write operations work directly on the virtual memory as if it was one of the files on the filesystem. Direct memory access is much faster because there is less inherent data copying, and no extra overhead related to the use of complex data structures such as btreemap. This creates a "fast file" at the cost of using one dedicated virtual memory storages. The user can mount several virtual memories, however, the number of virtual memories is limited.

The feature can have several purposes:

  1. Fast file for reading and writing can be helpful for applications like sqlite or some application related to intensive reading and writing to some particular file.
  2. A user can see their own virtual memory from the perspective of the file system or the wasi file system calls.
  3. Comparison with the fast file can be a sort of a baseline for estimating performance of work with the usual files.
wasm-forge commented 2 months ago

The feature is being implemented in pull request #15.

wasm-forge commented 1 month ago

the implementation of virtual memory mounts was merged into the main branch with v0.6