[webrtc-nv-use-cases] Using WebRTC peer-to-peer networks to back Service Workers (#60)

interfect has just created a new issue for https://github.com/w3c/webrtc-nv-use-cases:

== Using WebRTC peer-to-peer networks to back Service Workers ==
Currently all the use case document says about WebRTC-NV and workers is:

https://github.com/w3c/webrtc-nv-use-cases/blob/d053ca91165f9f522f6fc39ba3c10c5ce011b30e/index.html#L204-L208

https://github.com/w3c/webrtc-nv-use-cases/blob/d053ca91165f9f522f6fc39ba3c10c5ce011b30e/index.html#L310-L319

A lot of people over at https://github.com/w3c/webrtc-pc/issues/230 and related PRs have been asking for the machinery needed to effectively use WebRTC to build peer-to-peer networks in Service Workers specifically. The point of this is being able to fulfill requests for URLs by pulling them form a peer to peer network instead of going over HTTP. This would involve revising WebRTC so that the API is usable in Service Workers, and also revising Service Workers to clarify what the expected worker lifetime semantics should be for Service Workers that are maintaining WebRTC connections, so requests don't generally have to try and reconnect to the peer-to-peer network from scratch.

I opened an issue over on the current WebRTC spec recommending that the API be exposed to all forms of worker (https://github.com/w3c/webrtc-pc/issues/2553), but it seems like people are reluctant to revise 1.0 to have this feature, and sent it over here.

Making WebRTC work in Service Workers kind of fits into the "File Sharing" use case, especially this line:

https://github.com/w3c/webrtc-nv-use-cases/blob/d053ca91165f9f522f6fc39ba3c10c5ce011b30e/index.html#L175

But I think the part of N13 about supporting data exchange in "a worker" might need to change to list the types of workers that need access to the API explicitly, and include Service Workers.

There might also be room for an entire new use case focusing on peer-to-peer content distribution used to back a page or web application, instead of just on file sharing within the context of a video/voice conference between a few users (where an ordinary Web Worker would do).

Is it clear that N13 would require WebRTC to be available in Service Workers already? If not, should it be added there? Or should backing Service Worker fetches with a peer-to-peer network become an entire new use case section?

Please view or discuss this issue at https://github.com/w3c/webrtc-nv-use-cases/issues/60 using your GitHub account

Received on Wednesday, 8 July 2020 16:28:30 UTC