The Definitive Guide to HTML5 WebSocket is Now Available

A little while ago, we announced that our book, The Definitive Guide to HTML5 WebSocket, was on the horizon. Frank Salim, Peter Moskovits, and I are super excited to share the news that we finished writing the book and it’s NOW AVAILABLE. Yay!

The Definitive Guide to HTML5 WebSocket

The Definitive Guide to HTML5 WebSocket

This book provides an introduction to WebSocket, then describes the WebSocket API and Protocol and provides hands-on examples. We deep dive into three use cases for WebSocket, all using higher-level standard protocols (text and binary) over WebSocket. We walk through building a grown-up version of a chat application using XMPP/WS, a rock-paper-scissors game using pub-sub and STOMP/WS, and desktop sharing using RFB/WS (VNC). Finally, we examine security and deployment considerations. The book comes with the source code you need to get the demos up and running, as well as an easy-to-use VM with screencasts that show you what you’ll build.

Watch two of the authors, Vanessa and Peter, give a 90 second overview of the book:

Here’s an excerpt from Chapter 1, “Introduction to HTML5 WebSocket” from The Definitive Guide to HTML5 WebSocket (Apress, 2013):

WebSocket is about Performance

WebSocket makes real-time communication much more efficient.

You can always use polling (and sometimes even streaming) over HTTP to receive notifications over HTTP. However, WebSocket saves bandwidth, CPU power, and latency.

WebSocket is an innovation in performance.

WebSocket is about Simplicity

WebSocket makes communication between a client and server over the Web much simpler.

Those who have already gone through the headache of establishing real-time communication in pre-WebSocket architectures know that techniques for real-time notification over HTTP are overly complicated. Maintaining session state across stateless requests adds complexity. Cross-origin AJAX is convoluted, processing ordered requests with AJAX requires special consideration, and communicating with AJAX is complicated. Every attempt to stretch HTTP into use cases for which it was not designed increases software complexity.

WebSocket enables you to dramatically simplify connection-oriented communication in real-time applications.

WebSocket is about Standards

WebSocket is an underlying network protocol that enables you to build other standard protocols on top of it.

Many web applications are essentially monolithic. Most AJAX applications typically consist of tightly coupled client and server components. Because WebSocket naturally supports the concept of higher-level application protocols, you can more flexibly evolve clients and servers independently of one another. Supporting these higher-level protocols enables modularity and encourages the development of reusable components. For example, you can use the same XMPP over WebSocket client to sign onto different chat servers because all XMPP servers understand the same standard protocol.

WebSocket is an innovation in interoperable web applications.

WebSocket is about HTML5

WebSocket is part of an effort to provide advanced capabilities to HTML5 applications in order to compete with other platforms.

Every operating system needs networking capabilities. The ability for applications to open sockets and communicate with other hosts is a core feature provided by every major platform. HTML5 is, in many ways, a trend toward making web browsers fully capable application platforms that are analogous to operating systems. Low-level networking APIs like sockets would not mesh with the origin security model or API design style of the Web. WebSocket provides TCP-style networking for HTML5 applications without wrecking browser security and it has a modern JavaScript API.

WebSocket is a key component of the HTML5 platform and an incredibly powerful tool for developers.

You Need WebSocket!

Simply put, you need WebSocket to build world-class web applications. WebSocket addresses the major deficiencies that make HTTP unsuitable for real-time communication. The asynchronous, bidirectional communication patterns enabled by WebSocket are a return to the general flexibility afforded by transport layer protocols on the Internet.

Think about all the great ways you can use WebSocket and build true real-time functionality into your applications, like chat, collaborative document editing, massively multiplayer online (MMO) games, stock trading applications … the list goes on. We’ll take a look at specific applications later in this book.

Published by Apress and available on Amazon, this is the first printed book (also available as an ebook, for the Kindle, as a Nook book, and other formats) fully dedicated to the WebSocket technology.

After reading this book, we hope you’ll be as excited and inspired to use WebSocket as we are.

Thanks to our colleagues Steve Atkinson and Frank Greco for being our detailed and excellent reviewers!

This entry was posted in Book, html5, JMS, Kaazing, WebSocket and tagged , , , . Bookmark the permalink.

8 Responses to The Definitive Guide to HTML5 WebSocket is Now Available

  1. Mark says:

    This was a really huge effort, but I cannot think of better people to conduct it with such expertise! Congratulations to the team of Vanessa, Peter, and Frank, this is an amazing accomplishment and I am sure many developers will thank you in the near future.

  2. mikedgregory says:

    Aw-suhm!!! Congratulations Vanessa, Peter, and Frank!!

  3. Viv Schupman says:

    Congratulations to a great team! I preordered a copy of your book and I can’t wait for it to arrive. Will be asking each of you to sign my copy.

  4. Pingback: Ask the Authors on Google Developers Live: The Definitive Guide to HTML5 WebSocket | The Zinger

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s