Mahadi Siregar
Mahadi Siregar

Reputation: 625

Push Notification to Client

I built my project using Struts, Spring, and Hibernate. I am using Tomcat for the server. Now I want to implement push notifications in my web application, to perform tasks like updating a table on a view layer according to new data in the database, or show a notification when a certain condition occurs. How can I implement this, and what tools should I use? Maybe Comet or something similar? If you have a link to a tutorial, I would find that helpful.

I am also wondering whether this (push) is related to messaging?

I've tried this link but it looks like pull. My case is like a chatting application - if someone logs in, the other member will get a notification. I am confused about how to implement this.

Upvotes: 2

Views: 6004

Answers (3)

Pratap A.K
Pratap A.K

Reputation: 4517

Use Spring STOMP WebSockets.. its very easy and simple https://spring.io/guides/gs/messaging-stomp-websocket/

Upvotes: 1

leiblix
leiblix

Reputation: 696

Have you tried the framework Atmosphere? It supports websocket and also fallback to mentioned longpolling.

It can be used with jquery on the client side. Tutorial is here.

Upvotes: 1

Aniket Inge
Aniket Inge

Reputation: 25705

Well the easiest way is use ajax calls with long polling(jQuery comes to mind). Comet is fine too.

Upvotes: 0

Related Questions