©  Raj Malhotra 2019
Raj MalhotraRapid Java Persistence and Microserviceshttps://doi.org/10.1007/978-1-4842-4476-0_9

9. Java Websockets Development

Raj Malhotra1 
(1)
Faridabad, Haryana, India
 

This chapter covers how to use Websockets in Java to create real-time applications supporting millions of concurrent users. Websockets provide a bidirectional persistent connection to a HTTP web server so that the time taken to create HTTP connections can be reduced. HTTP 1.1 also allows long-lived connections through the keep-alive header, but the payload in each request is significantly bigger than Websockets.

There are often comparisons done to Websockets versus HTTP/2 with Server Side Events (SSE). HTTP/2 allows request multiplexing at the connection level ...

Get Rapid Java Persistence and Microservices: Persistence Made Easy Using Java EE8, JPA and Spring now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.