-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
Description
This is a placeholder for tracking open problems and related issues / notes
Embedding js-ipfs on a page binds it to specific tab, origin, and storage.
Open problems
Per Origin
js-ipfs embedded on a web page runs in the context of page's Origin, which means:
- datastore uses local storage allocated to the origin,
this means permissions and storage limits are shared with other JS running on a page - opening a new tab for the same page spawns a new, full instance of js-ipfs operating on the same datastore
- 💚
ipfs-message-portmodules now enable node sharing withing the same Origin: Sharing IPFS node across browsing contexts (tabs) on same origin js-ipfs#3022
- 💚
Cross Origin
Each websites running js-ipfs does it on its own:
- new datastore is created per Origin
- nodes are unable to share storage,
- data for a single CID can be stored multiple times in the same browser profile
- nodes are unable to share storage,
Same machine
js-ipfs is unable to discover ipfs-desktop running on the same machine.
It could leverage its existence for:
- delegated routing
- content preload
- circuit switching (relay)
- shared cache, data deduplication
- persistence (ensuring CIDs are cached outside non-persistent browser storage)
References
- Web API: "best-effort" vs "persistent" storage
- libp2p/specs/relay
- delegated routing: Add delegated routing to js-ipfs browser js-ipfs#2155 / Delegated Routing libp2p/js-libp2p#120
Prior Art
- multiple tabs leader election
- Exploration: P2P Network access through the service worker
Reactions are currently unavailable