Chapter 4. Understanding WebSocket

The idea of web applications was built upon a simple paradigm. In a unidirectional interaction, a web client sent a request to a server, the server replied to the request, and the client rendered the server's response. The communication started with a client-side request and ended with the server's response.

We built our web applications based on this paradigm; however, some drawbacks existed in the technology: the client had to wait for the server's response and refresh the browser to render it. This unidirectional nature of the communication required the client to initiate a request. Later technologies such as AJAX and long polling brought major advantages to our web applications. In AJAX, the client initiated ...

Get Spring MVC: Designing Real-World Web Applications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.