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

Implement service worker support for IPFS #34

Closed
bmann opened this issue Mar 11, 2020 · 2 comments
Closed

Implement service worker support for IPFS #34

bmann opened this issue Mar 11, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@bmann
Copy link
Member

bmann commented Mar 11, 2020

I'll start with the big part. IPFS Companion is a browser extension. Extensions run in the main web UI thread. Service / web workers run in their own thread.

To improve performance of Drive, we could implement a service worker version of IPFS running in the browser.

This would not be compatible with IPFS Companion, so this means dropping support for IPFS Companion. It has about 20K installs and lets users run a local IPFS node.

Since we focus on making our services work web native in all browsers, even if they use some cutting edge tech, relying on extensions isn't in line with our goals.

The problem is that we need a separate ipfs daemon in every webpage. So, performance when running multiple apps / across multiple domains may be an issue.

Relevant discussions from IPFS land:

@bmann bmann added the enhancement New feature or request label Mar 11, 2020
@icidasset
Copy link
Contributor

Some more context on why I think service workers are not compatible, or bad for performance, in regards to IPFS Companion at the moment:

  • We send a request to some (possibly non-existent) url which is intercepted by our service worker
  • Service worker COULD now contact the main thread to use IPFS Companion, but this would block the main thread. Because, the ipfs stuff is performed on said thread.
  • Another thing I imagine would be troublesome, is the transport layer between threads. I don't think you can do streaming.

@icidasset
Copy link
Contributor

Superseded by #105

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

2 participants