mardi 24 novembre 2020

Ask about web notifications, client architecture

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

  1. Check for new notifications by continuously requesting the server with setInterval.
    • I am worried that the useless usage of the server will increase.

  2. Develop a separate Websocket server to receive new notifications in the form of subscribe.
    • 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