Switch to ZenFS #446
Replies: 3 comments 3 replies
-
Hi @oeway, Thanks for the suggestion but I have followed the evolution of BrowserFS to ZenFS and I don't believe it's something I'd like to adopt. If I did switch the file system I would likely make my own from scratch as I have interest in this. I don't agree that having the file system linked to pyodide would require large changes to the way it works and I believe an adapter could be made if someone wanted to do such a thing. The version of BrowserFS I use is highly customized so in that way it's not deprecated, it's just maintained as a fork by me which is internal to daedalOS. BrowserFS has also always had sync and async, but the way I have mine setup it utilizes mostly async functionality. I also have an Emscripten backend which was also part of BrowserFS and is built into daedalOS. I have a hook which handles this (useEmscriptenMount) and is used by several apps (7 usages of hook) which themselves mount Emscripten file systems. |
Beta Was this translation helpful? Give feedback.
-
I played around with it a bit tonight but it would take time to make something. Possibly as pyodide supports Emscripten File Systems the BrowserFS one would have to mirror the existing IDB one. Information on the Pyodide FS is here: As for FS mirrors, there are examples like AsyncMirror in the old BrowserFS docs for taking a file system like IndexedDb and changing it: |
Beta Was this translation helpful? Give feedback.
-
Hi @DustinBrett Thanks for looking into this! Sounds like you have a good understanding to this. Honestly, I have no idea what it means to switch to ZenFS. As I understand, we can use AsyncMirror to map async fs (e.g. IndexedDb) to memory and mount it as Emscripten File Systems, however, it will require copy all the files into memory during initialization. This is not ideal since I would like to deal with large file system which will exceed the size of the memory. On the other hand, we can create a emscripten file system which map all the async operation to sync directly, this method has been used by jupyterlite, see pyodide-kernel and drivefs. Would it make sense to create something like a drivefs, then map all the operations to browserfs? |
Beta Was this translation helpful? Give feedback.
-
Hi, I am very much interested in accessing the entire daedalOS file system from pyodide/python, for that we will need to make the browserfs backends synchrous.
Interstingly, it looks like now
browserfs
has been deprecated and ZenFS fork is recommended. After a quick glance, it seems ZenFS has some really nice feature such as all backends are synchronous, and it has experimental support for the Emscripten backend. Most importantly, ZenFS is now actively maintained!Beta Was this translation helpful? Give feedback.
All reactions