HTML5 WebSocket represents the first major upgrade in the history of web communications. Before WebSocket, all communication between web clients and servers relied only on HTTP. Now, dynamic data can flow freely over WebSocket connections that are persistent (always on), full duplex (simultaneously bi-directional) and blazingly fast.

The WebSocket standard enables entirely new kinds of applications, just as the Web itself originally did. Businesses can now leverage this new technology to tap novel sources of revenue, reduce time-to-market, and slash the costs and complexity of their IT infrastructure.

The main purpose of WebSocket is to provide full-duplex communications channels over a single TCP connection that can support any protocol. Both the WebSocket API itself (W3C) and the WebSocket protocol are standards, see RFC 6455. While WebSocket was designed originally to be implemented in both web browsers and web servers, it provides such significant architectural benefits that it is being used more and more to communicate between any client and server that has to connect over the internet, for example in between native mobile applications and servers, and in between devices.

What WebSocket means for businesses

The Web is moving into its next phase morphing from a static and stale network to a live, interactive, and constantly changing mesh of communication and connectivity, a living Web. This new living Web will allow us to interact with our friends and colleagues at levels we couldn’t have imagined 5 years ago, solve business problems that seemed impossible, continue to innovate using the Web as a foundation for new solutions benefiting humanity, accessing systems and share information at levels never seen before. The Web as we know it today was only the beginning, now the Living Web will change everything. In addition, as more and more machine devices come online, the need for rapid communications in real time becomes even greater. More and more products are created every day that are designed to be in contact with the web 24 hours, 7 days a week. WebSocket is the foundation for all the technology that is fueling this revolution.

What WebSocket means for IT

The pressure to build applications that can communicate in real-time pre-dates the existence of WebSocket. Solutions, such as AJAX and COMET exist to run on top of HTTP and simulate real-time interactions. Unfortunately, these technologies use HTTP servers in a way that they were never designed to be used, causing a massive overhead in resources. Unlike traditional static web pages, dynamic web applications that leverage purely the HTTP protocol are incredibly costly to run. With WebSocket, the savings on server resources are enormous. There are many examples where real time applications based solely on http and requiring hundreds of servers to run suddenly drop to only two or three servers after they have been ported to WebSocket. For IT, this means significant cost savings that can be re-invested in building new features that bring new revenues. And since WebSocket is a standard, any application stack that leverages WebSocket in a standard way becomes a safe investment. An example of a standards-based server is the Kaazing WebSocket Gateway, an enterprise-grade, production server, built to help enterprises and their developers rapidly and easily build WebSocket solutions successfully and importantly, cost-effectively. Kaazing WebSocket Gateway offer additional security, emulation, pre-built API’s, client libraries and mobile features, it is built to improve the overall productivity for developers and system architects – shortening time and cost to market. To better understand how IT will benefit from WebSocket, please read the white paper 5 signs you need HTML5 WebSocket. For a more detailed overview of how WebSocket can provide enhanced security, please read the white paper Delivering Security Over Native Full-Duplex Web Connections.

What WebSocket means for architects and developers

WebSocket itself is an independent TCP-based protocol, but it is designed to support any other protocol that would traditionally only run on top of a pure TCP connection. The best way to think of WebSocket is as a transport layer on top of which any other protocol can run. The WebSocket API supports the ability to define sub-protocols: protocol libraries that can interpret specific protocols. Examples of such protocols include XMPP, STOMP, and AMQP. In this way, developers no longer have to think in terms of the HTTP request-response paradigm, but instead, they can select the most appropriate protocol for the type of applications they are writing. The only requirement on the browser-side is to run a JavaScript library that can interpret the WebSocket handshake, establish and maintain a WebSocket connection, and interpret specific protocols coming down the wire. On the server side, the industry standard is to use existing protocol libraries that run on top of TCP and leverage a WebSocket Gateway such as any of the Kaazing WebSocket Gateways supporting protocols like XMPP and AMQP, to translate TCP traffic into corresponding WebSocket traffic in a way that is both scalable and secure.

WebSocket for architects and developers

WebSocket connections are initiated via HTTP: HTTP servers typically interpret WebSocket handshakes as an Upgrade request. As such, WebSocket can both be a complementary add-on to an existing HTTP environment and can provide the required infrastructure to add web functionality that relies on more advanced, full duplex protocols that allow data to flow in both directions between client and server. HTTP remains the protocol of choice for transferring static html content and, with the advent of HTML5, HTTP provides the means by which to transfer a rich HTML5 application to the browser that will subsequently use a WebSocket connection to leverage the protocol most suitable for that specific HTML5 application.

To better understand how a new and revolutionary web-based communications platform based on WebSocket can fuel a whole new generation of applications, and how to build them, we recommend to read the white paper, Building Living Web Applications.

To better understand how a new and revolutionary web-based communications platform based on WebSocket can fuel a whole new generation of applications, and how to build them, we recommend reading the white paper, Building Living Web Applications. For more information on standards-based Kaazing Live Web Communication platform read this datasheet, Kaazing WebSocket Gateway.

TOP