-
Notifications
You must be signed in to change notification settings - Fork 29
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
Node reuse and resource sharing on the web #158
Comments
Hi @lidel, others, this issue has been a big blocker in terms of usability for us to run js nodes client-side on ipfs-search.com Is any work on this being done? Is this on the roadmap at all? |
There are some recent developments which make it easier to work with content-addressed data, often removing the need for running full js-ipfs, or hardcoding some WebSockets providers, preload nodes for performing bitswap:
|
Is using SharedWorkers under the hood an option? It think one limiation there is that stuff like WebRTC wouldn't be able to run within the worker. |
That is accurate. Thinking around there had been that we could implement custom transport that would leverage WebRTC in the host frames (select arbitrary host and ask it to proxy messages, if host times out select next host etc...). It is also worth calling out that SharedWorker was deliberately not implemented by Safari, however I've done some experiments simulating |
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:
this means permissions and storage limits are shared with other JS running on a page
ipfs-message-port
modules now enable node sharing withing the same Origin: Sharing IPFS node across browsing contexts (tabs) on same origin js-ipfs#3022Cross Origin
Each websites running js-ipfs does it on its own:
Same machine
js-ipfs is unable to discover ipfs-desktop running on the same machine.
It could leverage its existence for:
References
Prior Art
The text was updated successfully, but these errors were encountered: