Chapter 5 The Real-time Web


“If everything seems under control, you’re not going fast enough.”

  --Mario Andretti

Welcome to arguably the most important chapter in the book. Here we will learn the basics of building a real-time chat website. This is made easy thanks to a package called Socket.IO, or, if you like, “jQuery for sockets.” What this means is you only have to learn the Socket.IO API. Under the hood, the API might be using WebSockets, Flash, Comet, and, in the future, technology that is yet to exist! Socket.IO will seamlessly change protocols depending on the user’s browser capabilities without you having to write any additional code.

By the end of this chapter, you’ll have written a real-time chat application with ...

Get Jump Start Node.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.