Simple push notification in spring

I have a project related to job postings. Consultants or employers register on my website and then start posting jobs. I want to make push notifications for all users. When a consultant or employer submits a task, all online users should receive a notification that the employer has published this task without refreshing the page in jquery setInterval or timeout.

I am using Spring framework. I was looking for a solution, but found nothing. I want to know if Spring WebSockets was provided in my latest version. Is this possible with WebSockets?

I want to create a suitable resource so that it can be implemented on my website.

+4
source share
1 answer

There are two ways to meet your needs:

First polling, in which you resubmit requests from the client to the server. On the server side, for some reason, you need a message queue for each client to deliver incidents on demand. There is also another type of polling in which you send a request from the client and never end the request on the server side, so you have some kind of pipe between the two ends. This is called long polling. The disadvantage of polling is that you have to send requests to the server forever from the client, and in many cases the server sends empty messages because there were no events.

pushing websockets ( html5). websocket. afaik jetty tomcat . Spring 4 websocket, ; http://syntx.io/using-websockets-in-java-using-spring-4/

postoverflow post

+1

All Articles