I want to create a notification function on a web page. Which architecture is good for the next two initiatives?
situation
- My site is not a SPA (Single Page Application) type site.
- As a community type, page movement always occurs for every article and list.
- (I don't want to use Web Notification API.)
conception
- Check for new notifications by continuously requesting the server with
setInterval.-
I am worried that the useless usage of the server will increase.
-
- Develop a separate
Websocketserver to receive new notifications in the form ofsubscribe.-
Connection and disconnection occurs frequently due to a lot of page movement. Is this a side effect?
-
In this situation, we would appreciate if experienced developers let us know what architecture to use when trying to create a notification function.
Aucun commentaire:
Enregistrer un commentaire