Reader small image

You're reading from  Websocket Essentials: Building apps with HTML5 websockets

Product typeBook
Published inMay 2015
Reading LevelBeginner
Publisher
ISBN-139781784396756
Edition1st Edition
Languages
Right arrow
Author (1)
Varun Chopra
Varun Chopra
author image
Varun Chopra

Varun Chopra has a lot of experience in the design and development of enterprise applications. He has worked as a consultant and has extensive experience in integrating different technologies. Besides his love of technology, he is also a singer and a guitarist and loves gadgets.
Read more about Varun Chopra

Right arrow

Where does WebSockets fit?


As we have seen some examples of web applications, now the question here is where does WebSockets fit in these applications or any web application? Let us first understand something about application behavior; let us take an example of Gmail, which is basically a mailing client. The work of a mailing client is to fetch mails and display them. This sounds simple, but the problem arises when someone sends you a mail and you want that mail to be displayed right away. To implement such a functionality there are different ways, such as polling and long-polling, which are not efficient. So WebSockets solves the problem here by providing a server push facility. WebSockets provides functionality to push from both the client and server side, which makes it stand out.

WebSockets comes with some good features and great benefits over other methods of communication. Some of the features and benefits of WebSockets are:

  • Full-duplex communication

  • Low bandwidth consumption

  • Security

  • Low latency

  • Works over Transmission Control Protocol (TCP) (although it needs HTTP for initial handshake)

  • Supported by almost all the web browsers and web servers including mobile browsers

We can treat WebSockets as a feature which enhances the experience of web applications. And with HTML5-enhanced features, we can create a dynamic and real-time application.

Previous PageNext Page
You have been reading a chapter from
Websocket Essentials: Building apps with HTML5 websockets
Published in: May 2015Publisher: ISBN-13: 9781784396756
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Varun Chopra

Varun Chopra has a lot of experience in the design and development of enterprise applications. He has worked as a consultant and has extensive experience in integrating different technologies. Besides his love of technology, he is also a singer and a guitarist and loves gadgets.
Read more about Varun Chopra