The Definitive Guide to HTML5 WebSocket

Book description

The Definitive Guide to HTML5 WebSocket is the ultimate insider's WebSocket resource. This revolutionary new web technology enables you to harness the power of true real-time connectivity and build responsive, modern web applications.

This book contains everything web developers and architects need to know about WebSocket. It discusses how WebSocket-based architectures provide a dramatic reduction in unnecessary network overhead and latency compared to older HTTP (Ajax) architectures, how to layer widely used protocols such as XMPP and STOMP on top of WebSocket, and how to secure WebSocket connections and deploy WebSocket-based applications to the enterprise. Build real-time web applications with HTML5.

This book:

  • Introduces you to the WebSocket API and protocol

  • Describes and provides real-world examples of protocol communication over WebSocket

  • Explains WebSocket security and enterprise deployment

  • What you'll learn

  • Understand the WebSocket API and Protocol

  • Build Instant Messaging and Chat Applications over WebSocket with XMPP (Extensible Messaging and Presence Protocol)

  • Implement a Publish/Subscribe Messaging Protocol over WebSocket with STOMP (Simple Text Oriented Messaging Protocol)

  • VNC with the Remote Framebuffer Protocol

  • Learn WebSocket Security Deployment Considerations for an Enterprise WebSocket Architecture

  • Who this book is for

    The Definitive Guide to HTML5 WebSocket is for web developers and architects who want to build cutting-edge web applications with WebSocket. It is also designed for anyone who wants to implement a flexible and scalable architecture with built-in real-time connectivity and communication.

    Table of contents

    1. Title Page
    2. Dedication
    3. Contents at a Glance
    4. Contents
    5. Foreword
    6. About the Authors
    7. About the Technical Reviewer
    8. Acknowledgments
    9. CHAPTER 1: Introduction to HTML5 WebSocket
      1. What is HTML5?
      2. HTML5 Connectivity
      3. Overview of Older HTTP Architectures
      4. Introducing WebSocket
      5. Why Do You Need WebSocket?
      6. WebSocket and RFC 6455
      7. The World of WebSocket
      8. WebSocket Options
      9. Related Technologies
      10. Summary
    10. CHAPTER 2: The WebSocket API
      1. Overview of the WebSocket API
      2. Getting Started with the WebSocket API
      3. Putting It All Together
      4. Checking for WebSocket Support
      5. Using HTML5 Media with WebSocket
      6. Summary
    11. CHAPTER 3: The WebSocket Protocol
      1. Before the WebSocket Protocol
      2. Introducing the WebSocket Protocol
      3. The WebSocket Protocol
      4. Writing a WebSocket Server in JavaScript with Node.js
      5. Summary
    12. CHAPTER 4: Building Instant Messaging and Chat over WebSocket with XMPP
      1. Layered Protocols
      2. XMPP: A Streaming Mile of XML
      3. Building a Chat and Instant Messaging Application over WebSocket
      4. Suggested Extensions
      5. Summary
    13. CHAPTER 5: Using Messaging over WebSocket with STOMP
      1. Overview of Publish and Subscribe Models
      2. Introduction to STOMP
      3. Getting Started with Web Messaging
      4. Building a STOMP over WebSocket Application
      5. Suggested Extensions
      6. The Future of Web Messaging
      7. Summary
    14. CHAPTER 6: VNC with the Remote Framebuffer Protocol
      1. An Overview of Virtual Network Computing
      2. Building a VNC (RFB) Client over WebSocket
      3. Enhancing the Application
      4. Summary
    15. CHAPTER 7: WebSocket Security
      1. WebSocket Security Overview
      2. WebSocket Security Features
      3. Secure WebSocket Uses TLS (You Should, Too!)
      4. Authentication
      5. Application Level Security
      6. Summary
    16. CHAPTER 8: Deployment Considerations
      1. Overview of WebSocket Application Deployment
      2. WebSocket Emulation and Fallback
      3. Proxies and Other Network Intermediaries
      4. WebSocket Pings and Pongs
      5. WebSocket Buffering and Throttling
      6. Monitoring
      7. Capacity Planning
      8. Socket Limits
      9. WebSocket Application Deployment Checklist
      10. Summary
    17. APPENDIX A: Inspecting WebSocket Traffic
      1. WebSocket Frame Inspection with Google Chrome Developer Tools
      2. Google Chrome Network Internals
      3. Analyzing Network Packets with Wireshark
      4. Summary
    18. APPENDIX B: WebSocket Resources
      1. Using the Virtual Machine
      2. WebSocket Servers
    19. Index

    Product information

    • Title: The Definitive Guide to HTML5 WebSocket
    • Author(s): Vanessa Wang, Frank Salim, Peter Moskovits
    • Release date: February 2013
    • Publisher(s): Apress
    • ISBN: 9781430247401