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

OPFS persistance with multiple tabs, prevent lock issues #304

Open
marcus-pousette opened this issue Aug 3, 2024 · 1 comment
Open

OPFS persistance with multiple tabs, prevent lock issues #304

marcus-pousette opened this issue Aug 3, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@marcus-pousette
Copy link
Member

Current solution for persistance in the browser is to use OPFS for block and indexing store. This works well when only one tab is used, but when multiple tabs want to access the same file we will run into problems because accessHandles can only be accessed by one tab at once.

@marcus-pousette marcus-pousette added the enhancement New feature or request label Aug 3, 2024
@marcus-pousette
Copy link
Member Author

Possible solution.

Make one tab "parent" and the other ones "children".

When parent tab closed down, make one of the children the parent. All requests from the parent are done directly to the OPFS worker, while the other will broadcast a request to the other parent.

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

No branches or pull requests

1 participant