CHAPTER 4

image

Building Instant Messaging and Chat over WebSocket with XMPP

Chat is a great example of an Internet application that has become more difficult to build in an HTTP-only world. Chat and instant messaging applications are inherently asynchronous: either party can send a message at will without requiring a specific request or response. These applications are excellent use cases for WebSocket as they benefit hugely from reduced latency. When chatting with your friends and colleagues, you want as little delay as possible in order to have natural conversations. After all, if there were lots of lag, it would hardly be instant messaging.

Instant ...

Get The Definitive Guide to HTML5 WebSocket now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.