Open lidel opened 4 years ago
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?
https://github.com/ipfs-search/dweb-search-frontend/issues/150
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:
/certhash
section to understand why this is a big deal for usIs 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.
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 SharedWorker
API with ServiceWorker
instead.
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:
ipfs-message-port
modules now enable node sharing withing the same Origin: https://github.com/ipfs/js-ipfs/issues/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