I'm currently looking for the best fitting solution to handle notifications. My current options are either using websockets or just do a polling (only 1 request every minute, no long polling, no permanent polling)
I somehow have problems to find performance indicators for these methods. The result should be able to handle a lot of users in parallel without taking too much resources.
Option A:
- Every 30 Seconds a request is sent to check if the users has a new notification
Option B:
- Each users holds a websocket connection and is directly informed about a new notification
In the backend i'm using java spring with spring boot. Do you know any best practices or reference implementations?