Spring boot notification on edit

stefan manson :

I currently have a simple service with two columns.

Userid, Party

1, 
2,

Both clients retrieve this object on startup, with an empty party. One user can add some text in the Party column for both users. However when that happens, i would like to update the front end of both users.

How can i let user 1 know that party has been updated? Keep requesting the object for change would be bad practise.

Terry :

as said by Himadri Mandal, the proper way to do such thing would be to use websockets.

There is a clear tutorial on how to implement websocket using Spring available here : https://spring.io/guides/gs/messaging-stomp-websocket/

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=389361&siteId=1