From Zero to Hero with Spring WebSocket

SpringDeveloper · 119K views · 2016 · 1:31:00

Open on YouTube

Web developmentSoftware architecture & designtalkdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering questions about Spring WebSocket, SSE and STOMP, especially for its comparison of protocols and its coverage of scaling across multiple server instances.

Recommended by 2 people across 2 different months, 2016 to 2020.

What it is

A SpringOne2GX 2015 conference talk by Sergi Almar on adding real-time features to a Spring MVC application. It starts with Server-sent Events in Spring 4.2, moves to bidirectional messaging over WebSockets with STOMP, and covers scaling and deploying to Cloud Foundry.

What people said

Recommends 11thdimension · 2016-11 · Stack Overflow · on “Polling on Backend without ajax”

Any method that you use for polling with no burden of reestablishing the connection would have to use a dedicated socket, SSE/Long Polling/Websocket. Checkout this [this video] , it covers the techs used for this sort of ues cases quite well.

Recommends Peter Lustig · 2020-03 · Stack Overflow · on “Spingboot Websocket Stomp”

@continuousLearner I would recommend to watch this talk [this video] It is really detailed and shows pros and cons of the protocols and sub protocols.

Cites 11thdimension · 2016-05 · Stack Overflow · on “HTML5 EventSource sending multiple requests”

I'm trying to implement Server Sent Events [LINK] using Spring SseEmitter [LINK] as described in this [this video] . I'm able to initiate the event stream and receive the data from the server sent event. However, I can see multiple EventStream type requests fired from the client and arriving at the server. The way I understand it, EventSource should send a single HTTP request and then should maintain a half duplex connection from the server, using which server sends the events to the client. Why is it then sending requests at regular interval ? Isn't it then like polling instead of a half duplex connection ? Bellow is the code that I'm using. Server code import java.util.ArrayList; import java.ut

Cites Bertrand P · 2019-03 · Stack Overflow · on “Spring Boot 2 + Websockets + Load balancer”

If you have multiple instances of your websocket server, then every instance needs to know the sessions that exists on other instances. Therefore you need to use a broker relay (not the in-memory broker given by spring) and set the UserRegistryBroadcast property. You can find some info related to this at the end of this talk [this video]