Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Origin private file system #7

Open
marcus-pousette opened this issue Sep 30, 2023 · 9 comments
Open

Use Origin private file system #7

marcus-pousette opened this issue Sep 30, 2023 · 9 comments

Comments

@marcus-pousette
Copy link

What is the possibility of using Origin private file system instead of IndexedDB?

https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system

@vweevers
Copy link
Member

Should be possible. There's an older issue here about making a wasm build of LevelDB: Level/community#63. It didn't go anywhere because of fs limitations at the time, but OPFS changes that. I think everyone would be happy to get rid of IndexedDB.

@marcus-pousette
Copy link
Author

okey!
When I look at it, the challenging things with OPFS is that there are no prefix, query capabilities for finding all files with certain prefix, which seems to be necessary when trying to be compatible with the Level interface.

@vweevers
Copy link
Member

Yeah, OPFS alone isn't enough, just provides raw storage. Using any filesystem as a key-value database (where keys are files) isn't gonna be performant. It needs a specialized data structure like LSM trees, which is what LevelDB provides.

@MentalGear
Copy link

OPFS would be great for stable reliable in browser usage. As far as I know browser-level uses indexdb which - unless this library has special patches - is unreliable on mobile. Mobile browsers, especially safari, more or less randomly delete indexdb stores (not to speak of the recent Apple WebApp elimination disaster).

@guest271314

This comment was marked as off-topic.

@guest271314

This comment was marked as off-topic.

@vweevers

This comment was marked as off-topic.

@guest271314

This comment was marked as off-topic.

@guest271314

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants