Posts

Showing posts from January, 2015

Explore Spring 4 Features: WebSocket (Part I)

First of all Wish you a Very Happy New Year WebSocket with Spring 4 One of the interesting features of Spring 4 is introduction of WebSockets in Spring. Now the first Question which arises is what is WebSocket? Definition: WebSocket is a protocol which allows for communication between the client and the server/endpoint using a single TCP connection. This protocol is an important new capability for web applications: full-duplex, two-way communication between client and server. It aims at making web more interactive including Java applets, XMLHttpRequest. An abstract of the actual process which happens behind the scene for WebSocket is: During initialization of this protocol,HTTP is used only for the initial handshake, which relies on a mechanism built into HTTP to request a protocol upgrade (or in this case a protocol switch) to which the server can respond with HTTP status 101 (switching protocols) if it agrees. Assuming the handshake succeeds the TCP socket unde