From the course: Java EE 8 Essential Training
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
WebSocket overview - Java EE Tutorial
From the course: Java EE 8 Essential Training
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.