Book Image

Learning Node.js for Mobile Application Development

Book Image

Learning Node.js for Mobile Application Development

Overview of this book

Table of Contents (21 chapters)
Learning Node.js for Mobile Application Development
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
14
Creating an E-Commerce Application Using the Ionic Framework
Index

Chapter 5. Real-Time Data and WebSockets

In this chapter, we will show you how to enable real-time data communication using WebSockets. This will allow your server to directly communicate with the connected clients without having any polling on the client side.

I would really love a two-way conversation, John

In its infancy, the Internet was not much of a two-way street. The traditional client-server architecture was the king, and servers initiating communication with clients was almost unheard of (and quite possibly seen as quite heretical by some, too).

However, starting with protocols such as Internet Relay Chat (IRC), real-time chat applications quickly became killer apps over time, with an enormous surge in popularity among ordinary users (if you are old enough to remember the instant messaging computer program (ICQ), yes, that is nostalgia that you are feeling). It was not very long until real-time features took the leap to the HTTP world, causing browser-based chat services to pop up...