Hacker News new | ask | show | jobs
by tholm 1055 days ago
That's exactly what inspired me to make this, I wanted to learn about WebRTC and used that idea as a base but also wanted the potential to play more real-time titles as well.
1 comments

Curious what is the advantage/disadvantage of WebRTC for an application like this vs WebSockets?
Great question my original implementation was actually with WebSockets for this. I ended up going with WebRTC as I'm using AWS APIGateway and streaming data for things like audio and video end up being very chatty or you end up buffering to reduce chattiness (and cost) but introduce lots of latency. I decided to shift to a peer to peer model to try and keep the latency down and use the websockets implementation I'd written as a signalling server instead.

Websockets are way easier to comprehend and implement than WebRTC (learning the connection negotiation process for NAT traversal isn't much fun). But in the end using WebRTC meant I could host a more cost effective demo that could still scale reasonably well.