From the course: Java EE 8 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

WebSocket overview

WebSocket overview - Java EE Tutorial

From the course: Java EE 8 Essential Training

Start my 1-month free trial

WebSocket overview

- [Narrator] This chapter focuses on the Java EE WebSocket API. The WebSocket API is used to allow Java applications to communicate over the WebSocket protocol. Let's talk a little bit about that protocol before proceeding. Highly interactive web applications have increased the need for two-way communication between browsers and servers. These apps need data to be pushed from the server at will without the client initiating a request. The HTTP standard protocol for Internet communications is inefficient at filling this requirement and developers started building polling mechanisms that continuously ping the server from the browser to potentially retrieve data. Sometimes there was data, sometimes there wasn't. These mechanisms are inefficient, because many connections are created and HTTP headers were required to be sent with every request. The WebSockets Protocol was developed to address these needs, allowing…

Contents