4 ms·
> there is no good way to emulate p2p locally Disagree. You can implement functional tests with a loopback signal server. You can implement e2e tests with netw
by dboreham 6y ago
> there is no good way to emulate p2p locally
Disagree. You can implement functional tests with a loopback signal server. You can implement e2e tests with network emulation (e.g. using iptables/iptraf). Automated testing using the browser WebRTC stack (obviously run basic tests in Node.JS for convenience) is annoying but doable with puppeteer or the like. Just takes time and effort.
The point of WebRTC vs hairpin'ed websocket streams is that the bulk data doesn't pass through intermediate hosts, making the system less costly to run and more privacy preserving. Note that any TURN service required can always be provided or controlled by one of the parties -- it doesn't have to be a centralized service.
- mrozbarry 6y agoSure, you can do all that, but then I think you're in docker-land or something similar, and you are essentially building a system that works the way you think it does, and it may not reflect reality (arguably that is most testing). And I think if someone is to build this containerized system for testing, it shouldn't necessarily be some app developer like me, it should be someone like the chromium or firefox team that know exactly how the browsers expect to communicate
- erickj 6y ago"You can implement e2e tests with network emulation (e.g. using iptables/iptraf)" or via network isolation through networking namespaces (e.g. with podman and lxc)
- f430 6y agowhat you just described is over my head and I found parent's experience to be a genuine frustration with inconsistent production/development.