Skip to content

WasmFS: IndexedDB backend #15942

Open
Open

Description

@tlively

Add a concrete WasmFS backend for managing files in IndexedDB, analogous to the current IDBFS.

Depends on #15946.

Activity

  1. moved this from Feature parity to Todo in WasmFSon Jan 10, 2022
  2. added this to the WasmFS feature parity milestone on Jan 10, 2022
  3. junyuecao commented on Mar 6, 2022

    @junyuecao
    Contributor

    The current IDBFS only provide file persistence and it loads all file into memory at once. It'll be great if the new FS could load into memory by demand.

  4. tlively commented on Mar 7, 2022

    @tlively
    MemberAuthor

    Yes, the way I envision this working is that the IDB backend itself would always load data on-demand and a separately configured caching layer would improve performance by keeping a limited amount of data in memory.

  5. junyuecao commented on Oct 26, 2022

    @junyuecao
    Contributor

    @tlively May I ask for the current status of IDB backend or what is the plan?

  6. tlively commented on Oct 31, 2022

    @tlively
    MemberAuthor

    I've written a design doc for how a WasmFS IndexedDB backend might work, but no implementation work has started on it. So far we've been prioritizing work on the OPFS backend to get it to be stable and fast. Even with a better IndexedDB backend design, OPFS with SyncAccessHandles will still be much faster than IndexedDB. Do you have a use case for IndexedDB that couldn't use OPFS?

  7. mere-human commented on Nov 1, 2022

    @mere-human
    Contributor

    I have a use case for IndexedDB backend. I need to save some user modifications between browser sessions in a document editing app. Currently it's done via custom FS backend + Emscripten async IndexedDB API (emscripten_idb_async_delete() and such). This custom implementation has some bugs but works well in most cases.

  8. maccman commented on Dec 12, 2022

    @maccman

    I think it's important that we have a fallback to SyncAccessHandles when they are not available. I believe IndexedDb is the only viable one because it doesn't have storage limitations - but I could be wrong?

  9. AntonOfTheWoods commented on Aug 17, 2023

    @AntonOfTheWoods

    There is also the fact that sync also only works in web workers, and there are other places, like extensions, where it would be great to have persistent storage!

  10. defundinformants commented on Sep 25, 2023

    @defundinformants
  11. tlively commented on Oct 5, 2023

    @tlively
    MemberAuthor

    The latest thinking here is that it would be good to provide a bridge between WasmFS and the legacy file system backends, including IDBFS, rather than implementing a new WasmFS IndexedDB backend from scratch (although that would certainly still be possible and would have better performance). Unfortunately no concrete work is planned for this, though.

  12. mere-human commented on Nov 12, 2023

    @mere-human
    Contributor

    The latest thinking here is that it would be good to provide a bridge between WasmFS and the legacy file system backends

    @tlively Is there a GitHub issue where this work could be tracked?

  13. tlively commented on Nov 27, 2023

    @tlively
    MemberAuthor

    @mere-human the issue for this is #18935.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status
      Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions