6 ms·
Author might be interested in a recent thing I released to use a cloudflare worker instead of webtorrent servers for signaling: https://github.com/gfodor/p2pcf
by gfodor 4y ago
Author might be interested in a recent thing I released to use a cloudflare worker instead of webtorrent servers for signaling:
https://github.com/gfodor/p2pcf https://github.com/gfodor/p2pcf
- jckahn 4y agoI'm using https://github.com/dmotz/trystero https://github.com/dmotz/trystero for all the networking, and I don't think it supports p2pcf. If that existed a connection strategy for Trystero, I'd be open to experimenting with it!
- earnesti 4y agoSounds centralized
- gfodor 4y agoAny application using WebRTC is forced to use some kind of centralized signaling service. The OP uses WebTorrent trackers. At least, until there's a well established analog to the BitTorrent DHT, but that doesn't seem likely anytime soon.
- Sophira 4y agoWouldn't that make it centralised, though, with Cloudflare being necessary for it to work?
- nl 4y agohttps://github.com/dmotz/trystero#how-it-works https://github.com/dmotz/trystero#how-it-works You always need some kind of centralization for discovery with WebRTC.
- deepstack 4y agowould be good to make the discovery be a module that can be replaced or used as a redundant plugin. That way the user can use DHT, WebTorrent, CloudFlare or whatever.
- gfodor 4y agoThe library they are using does this. I wrote my own separate library that uses Cloudflare because it uses a bespoke protocol that takes advantage of some WebRTC hacks (SDP munging, DTLS certificate reuse, peer reflexive candidates, etc) to minimize I/O to R2 and hence reduce costs on Cloudflare.
- bilekas 4y agoThis looks kind of interesting, can't dig too much into right now on my phone, but is the idea just for signalling while the "rooms/channels" are empty? I'm not sure what the point might be in that case. Or is it a cloudflare service based websocket service? I'll check it out when I have a chance at Which point I'll probably have some more dumb questions!
- gfodor 4y agoIt's a HTTP polling based Cloudflare worker that can be used to establish WebRTC connections. A signaling service of some kind is always necessary to use WebRTC. The OP uses WebTorrent trackers which can work but have some limitations and ultimately have their own risk profiles. The Cloudflare worker approach offers some unique tradeoffs that make it compelling relative to other options: - Outage risk is reduced down to Cloudflare workers platform. (vs volunteer-run services like WebTorrent trackers) - The costs are zero for a moderate level of traffic. (I intentionally designed the protocol for this project to take advantage of the cheapest available approach on Cloudflare, which is free in the best case.)
- deepstack 4y agogfodor, just FYI your link on github is not working. I get "We had issues producing the response to your request." from github.
- gfodor 4y agoSorry, which link?