I have seen issues such as qaru.site/questions/196419 / ... . It talks about the client side of the implementation.
I am looking for information about the server part and the network part (how the client receives real-time notification)
A custom script might look like this:
- something happens for user-a
- the server creates a message for user-a in the database (to ensure stability): I use the django activity stream for this
- the server sends (new or last 10) messages to the browser user (when the user logs in or when the event occurs)
- the browser displays a message ( Notify a panel similar to the stackoverflow part
- if the user confirms the message (by clicking the Inbox in SO), all invisible messages are marked as read and written on the server
I have questions on the following steps.
- (3) Not sure, but https://github.com/stephenmcd/django-socketio can be used.
- (4) The answer to the question says that the client has json data received from the server.
Does the server send messages to the user for each request?
Does the client check the local storage (I'm new to the Internet, what good local storage is for this purpose?) And request json data if it does not have it in local storage? - (5) How do I implement these
seenand unseen? django-activity-stream has no idea about them.