Hacker News new | ask | show | jobs
by kelnos 3254 days ago
This seems to come up every now and then, and I see the same arguments, and they're still not compelling.

WebRTC data channels in unreliable mode will work just fine. Is it as easy as opening up a WebSocket connection? No, it's not. Is it as easy on the server side as accepting a WebSocket connection? Also no.

But it really isn't that hard[0], and people have built libraries to help you out. So just use one, and move on with your life.

And you also benefit from a standard that has been fleshed out over multiple years by some very smart (if imperfect) people.

On the browser side, it's already supported by all major browsers, with the notable exception of iOS Safari (which should change this fall with the release of iOS 11)[1]. Even though it's not ideal, you can fall back to WebSocket for the few holdouts.

[0] Source: I've done it before, building it from scratch.

[1] https://caniuse.com/#feat=rtcpeerconnection