Hacker News new | ask | show | jobs
by segasuperstar 993 days ago
Stupid question, what do I use it for?
2 comments

Not a stupid question at all. If you're building anything in the realm of real-time gaming or high-frequency streaming, WebRTC is your go-to. It operates on UDP, which means minimal latency and rapid data transfer, keeping user experiences smooth. Plus, it comes with built-in NAT traversal and encryption, saving you from some standard dev headaches.

While originating in the browser as a P2P tech, using a Node WebRTC library can gain you server-side control for even better performance. At the really sophisticated end that can be intelligent routing and on-the-fly quality adjustments, so you're not just faster but smarter in delivering content.

I think WebRTC is essential for any real-time project, and coupling it with Node.js takes your tech stack from good to very good. We use it in BrowserBox to stream the viewport of a remote browser: https://github.com/BrowserBox/BrowserBox

Browsing the lib quickly, it seems like scenarios where you want to connect a server written in Node to clients that talks WebRTC.

For a low-latency gameserver where clients talk via PeerConnection, clients could talk to the server with the same code if it's authorative.

Recording/transcoding a multiuser video-chat session.

Possibly also Ice (helping clients connect to each other if they are behind firewalls)