With your server architecture in mind, the next question is how live data actually reaches players. Chat messages, lobby updates, player movement, and match events all need a connection that stays open and delivers messages the moment something happens, instead of waiting for the client to ask.
This module covers the main tools for that job: WebSockets for a persistent two-way channel between browser and server, Socket.IO for rooms, events, and automatic reconnection on top of it, and WebRTC for low-latency peer-to-peer data channels that can behave like UDP. You'll learn what each one is good at and where it falls short.
You don't need to use all three in one project. Pick the simplest option that fits your game, then carry that choice into Databases & Persistence, the next module, where you'll decide what to save and where.
How a WebSocket connection starts with an HTTP handshake, where persistent connections shine, and what trade-offs to expect.
A hands-on introduction to Socket.IO: sending and receiving events, broadcasting to other clients, and organizing users into rooms.
The concepts behind WebRTC, including NAT, STUN, TURN, ICE, SDP, and signaling, with a demo and a look at the pros and cons.
A quick overview of how WebRTC connects peers directly and why it can deliver data with very low latency.