A
A
Andrei1penguin12021-07-08 22:28:45
Django
Andrei1penguin1, 2021-07-08 22:28:45

How to notify the user about a new message?

Good day, there is a small chat where users can communicate with each other, it's all based on django, channels and websocket.
It is necessary that when one user sends a message to another, a notification arrives.
I'm a little confused, because everywhere they write about opening a separate stream, listening to all chats, and there can be many of them, and sending a notification if the chat is updated.
As for me, the method is extremely barbaric.
But the idea of ​​sending something extra from the user who wrote the messages is even worse, since in this case you will get constant requests unnecessary to the server
Prompt please, what architecture is better to apply for such task?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question