Now I can hear you. Where is the push facade of web protocols?
Well one answer to the increasing need for real-time web applications, such as online gaming, live chats, stock market tickers, and collaborative tools is WebSockets.
In 2008, Ian Hickson, an engineer at Google and one of the primary contributors to the HTML5 standard, proposed WebSockets as part of the HTML5 specification.
The goal was to enable a full-duplex communication channel over a single TCP connection between a client and server, where both can send messages to each other independently of any request/response cycle.
By 2011, the WebSocket protocol (RFC 6455) was standardized by the IETF (Internet Engineering Task Force), while the WebSocket API was standardized by the W3C (World Wide Web Consortium). This marked a major leap forward for enabling real-time communication on the web.
Main advantages offered by WebSockets:
- Low Latency: WebSockets enable real-time communication with minimal delay.
- Efficiency: WebSockets are more efficient than polling or long-polling because they maintain a persistent connection and reduce overhead.
- Broad Browser Support: WebSockets are supported by all modern browsers, making them highly accessible for developers.
Current Adoption:
- Real-Time Applications: WebSockets are essential in fields like online gaming (e.g., multiplayer features in gaming platforms), live sports updates, stock exchanges, and collaborative tools (e.g., Google Docs real-time editing).
- Corporate Use: Platforms like Slack, Discord, and Trello use WebSockets for enabling live messaging and real-time collaboration.
- IoT (Internet of Things): Many IoT applications use WebSockets for maintaining continuous communication between devices and servers.
- Financial Trading Platforms: Real-time updates on stock prices and financial instruments.
Due to its benefits, WebSockets remain a crucial technology for bidirectional, real-time communication in web applications.
With the rise of other real-time communication protocols like Server-Sent Events (SSE) and HTTP/2, the landscape evolved.
Read on tomorrow, where we expand on SSE.