Free Sample
+ Collection

Socket.IO Real-time Web Application Development

Rohit Rai

Build modern real-time web applications powered by Socket.IO
RRP $16.99
RRP $24.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781782160786
Paperback140 pages

About This Book

  • Understand the usage of various features like rooms, namespaces, and sessions
  • Secure the communication
  • Deploy and scale your and Node.js applications in production
  • A practical guide that quickly gets you up and running with

Who This Book Is For

This book is aimed at developers who want to start developing highly interactive and real-time web applications like chat systems or online multiplayer games, or want to introduce real-time updates or server push mechanisms in their existing applications. Knowledge of developing in JavaScript and web applications in general is expected. Though there is a chapter on introducing Node.js, prior knowledge of Node.js will be a plus.

Table of Contents

Chapter 1: Going Real Time on the Web
What is real-time web?
A bit of history
Applications of real-time web
Chapter 2: Getting Started with Node.js
The origin of Node.js
Why Node.js
How to get Node.js
Node.js package manager (npm)
Hello World with Node.js
Hello Web
Routing the requests
HTTP Methods
Creating our own Modules
Serving files
Third party modules and Express JS
Chapter 3: Let's Chat
Creating the application
Designing the chat room
Bringing in jQuery
Handling events
The server
The client
Chapter 4: Making It More Fun!
Giving names to users
More on events
Working with namespaces
Listing the rooms
Sharing the session
Chapter 5: The Socket.IO Protocol
Why do we need another protocol?
The Socket.IO socket
The Socket.IO connection
Socket.IO messages
Chapter 6: Deploying and Scaling
The production environment
Running the application
Keeping it running
The node cluster
Scaling up the application
Tips for node in production

What You Will Learn

  • Establish a bidirectional connection in the  browser to the web server
  • Develop a chat system using Node.js and
  • Various methods of pushing information from the server to the browser
  • Get familiar with API for cross-browser bidirectional communication
  • Understand the protocol and its mechanics behind the scenes
  • Get to know messaging, events, sessions, authorization, namespaces, and rooms
  • Cluster and distribute the sessions using redis session store

In Detail

The expectations of users for interactivity withweb applications have changed over the past few years. No more does the user want to press the refresh button to check if new messages have arrived in their inbox; people expect to see updates in their applications in real-time. Mass multiplayer online games have given up the requirement of plugins and are built entirely in JavaScript. enables you to build these highly interactive applications that work cross-browser.

" Real-time Web Application Development" is a guide to building, deploying, and scaling highly interactive real-time web applications using This book will guide you through the building of a chat system using Node.js and, helping you get familiar with various features of the framework. Going further it will empower you to deploy and scale your applications in production.

Introducing web application development with Node.js, this book walks you through developing of a full-fledged chat system built with and introducing all the concepts of and its usage in the process.

It introduces you to the different approaches of bidirectional communication between the browser and the web server and will show you how abstracts all this for you to provide a single unified and uniform API for messaging and eventing to develop cross-browser applications. It explains how to authenticate your users, segregate the communication to channels, build chat rooms, and handle and scale sessions. It explains the mechanics behind and it also introduces you to what is involved in deploying the application to production and the intricacies involved in scaling it.

This book will introduce you to all that is needed in browser-server communication to develop the next generation of interactive applications and games.


Read More