Browser Using the File System Access API
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- database
Research direction
Start by comparing the existing IDBBlockstore and IDBDatastore implementations with the Node.js blockstore-fs interface. Review the File System Access API documentation and its browser and security constraints. Done would require a browser-compatible blockstore-FS, an IndexedDB fallback, and resolved design decisions around support, performance, and persistence.
Written by the indexing model from the issue text.
Description
Description:
Currently, Helia uses IndexedDB-based blockstore/datastore (IDBBlockstore and IDBDatastore) in the browser. While these work, IndexedDB has limits on storage size and performance. I propose adding a new blockstore implementation for browsers that leverages the File System Access API. This would allow users to choose a local folder for storing blocks, offering:
- Larger storage capacity: Bypassing some IndexedDB limitations.
- Better persistence and backup: Data is saved as files on the local filesystem, making it easier to back up or transfer.
- Potential performance improvements: Direct filesystem access might be faster for some operations.
Implementation:
- Create a blockstore-FS that follows a similar interface to the Node.js blockstore-fs, but is adapted for the browser using the File System Access API.
- Provide a fallback to IndexedDB if the File System Access API is not supported.
Open Questions:
I do not fully understand what limitations or trade-offs might arise with this approach. I would love to hear opinions and suggestions from the community on potential challenges, such as issues with cross-browser support, performance, or security. What do you think guys? 🤔
Potential Benefits:
- More flexibility for apps with high storage needs.
- Easier backup and transfer of stored data.
- Improved user experience on supported browsers (e.g., Chrome, Edge).
Feedback and discussion on design details and potential limitations would be greatly appreciated.
- Dominant language
- TypeScript
- Stars
- 39
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ipfs/js-stores
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
need/triage
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
feat: create new core data & blockstore that acts as a cache/buffered storeMay be free again @SgtPooki claimed this 1046 days ago, and no pull request is open. Opendif/medium effort/days kind/enhancement P1 status/in-progress
-
need/triage
Difficulty 1/5 Under an hour Newbie friendliness 45/100
-
datastore-idb .query doesn't work as expectedMay be free again A pull request for this issue was closed without being merged. Openkind/bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
area:cli area:security bug priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
"code source" and "numerique.gouv" links: "new window" mention duplicated in the accessible nameOpenaccessibility
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
numerique-gouv/lasuite-landingpage#315 ·
Maintainers usually reply within 1 day
-
needs:triage
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
HyeokjaeChoi/vaultme#585 ·
Maintainers usually reply within 1 day
-
enhancement priority/P2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
beettlle/pi-smart-router#200 ·