RANIARANIA Academy

Real-Time Applications with WebSockets

Build real-time features in Node.js — a persistent, bidirectional channel between server and clients using the WebSocket protocol, the ws library and Socket.IO. You will finish able to build a live chat or notifications feature with events, rooms and broadcasting, then scale it across processes and combine it cleanly with a REST API.

Watch the free preview

Why real-time, and how WebSockets work — free to watch, no account needed.

Node.js ADVANCED · 150 min · Certificate on completion · 3 CPD points

What you'll learn

  • Build real-time features in Node.js with WebSockets, events, rooms and broadcasting
  • Explain the WebSocket protocol, its HTTP upgrade handshake and when to use it over polling
  • Implement a live chat and notifications feature with the ws library and with Socket.IO
  • Scale a real-time app across multiple processes with a Redis adapter and sticky sessions
  • Combine a REST API with a real-time layer securely, with authentication and heartbeats

Syllabus

WebSockets and the Real-Time Problem
Why real-time, and how WebSockets workFree preview15 min
Your first WebSocket server with ws15 min
Broadcasting and Robust Connections with ws
Messages, events and broadcasting15 min
Heartbeats, reconnection and the connection lifecycle15 min
Socket.IO — Events, Rooms and Broadcasting
Socket.IO fundamentals — events and acknowledgements15 min
Rooms, namespaces and broadcasting15 min
Production Real-Time — Scaling and REST Integration
Scaling across processes with the Redis adapter15 min
Combining REST with real-time, securely15 min
Lab — 10 Exercises & Solutions
Exercises 1–515 min
Exercises 6–1015 min