-
Notifications
You must be signed in to change notification settings - Fork 115
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
Make WebRTC usable as a backend for Service Workers to fulfill requests from a peer-to-peer network #2553
Labels
Comments
I think this needs to be considered as an extension, given the sate of play of WebRTC. |
@alvestrand You mean https:/w3c/webrtc-nv-use-cases right? |
Yes. Thanks for filing, closing here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The long-lived #230 does not quite capture one of the things that people are looking for from the WebRTC API, which is to be able to use it to back the resource-serving capabilities of Service Workers with a peer-to-peer network.
See for example:
I'm proposing a couple changes to make this work, only one of which is really part of the WebRTC spec itself:
Change 1 looks to consist, on the spec side, of just changing
[Exposed=Window]
to[Exposed=(Window,Worker)]
on all of the types. That's how IndexedDB, which is available from both pages and workers, appears to do it. But there would also presumably need to be some suggestion of how the WebRTC events are expected to affect service worker lifetime. My suggestion would be to say that workers are allowed to be terminated in the middle of handling events from peers. This might require minor revisions to the service worker spec which currently prohibits terminating a service worker that has an event to handle except in cases of user-agent-defined abnormal operation, of which "getting lots of events from peers" is probably not a good example.Change 2 is probably entirely within the Service Worker spec's section on service worker lifetime.
The text was updated successfully, but these errors were encountered: