O'Reilly logo

Developing RESTful Services with JAX-RS 2.0, WebSockets, and JSON by Bhakti Mehta, Masoud Kalali

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. WebSockets and Server-sent Events

With the advancements in web architecture and emerging platforms, which can provide real-time or near real-time information, the necessity of having an effective way of communicating these updates to clients caused the urge of introducing new programming models and new standards that make use of this real-time information easier for the consumer side of the system, also known as clients (mostly web browsers).

In this chapter we will cover the following topics:

  • The programming models and solutions that can be used to address near real-time update transfer to clients
  • Using Server-sent Events (SSE)
  • Using WebSockets

Different snippets are included in this chapter but complete samples which shows these snippet ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required