0

I'm creating a web application these days.

Backend portion is implemented in Spring Boot (inter alia MVC and Data), but frontend portion is implemented in Angular.

I would like to create push notifications like that which would be displayed in real time after adding a row to the table in the database (from a level of frontend).

For example:

Step 1. User adds one element to the table (send POST request)

Step 2. Other users get the push notification with inforamtion that the element was added. (If the response staus is CREATED)

I have created classes (controller, model, view) but this data is displayed on the basis of GET request so far. Typically... because if I don't refresh the page, I don't see any changes.

What do you think - what technologies should I use to achieve above result? Or maybe there's some tutorials with implementation similar problems?

plkpiotr
  • 345
  • 2
  • 9
  • 23
  • 2
    Notifications from the server to another user are handled with sockets. Find more information here : https://socket.io/ –  Aug 20 '18 at 09:26
  • Thanks for the clue ;) – plkpiotr Aug 20 '18 at 09:30
  • 2
    Another option would be to use [SSE](https://www.w3schools.com/html/html5_serversentevents.asp).You can read [here](https://stackoverflow.com/questions/5195452/websockets-vs-server-sent-events-eventsource) for the difference with web sockets. Web sockets can be an overkill in some cases. – Rohit Aug 20 '18 at 09:37
  • @Rohit thank you :) SSEs could be better in my case... – plkpiotr Aug 20 '18 at 09:52

0 Answers0