I've seen questions like Notify panel similar to stackoverflow's. It talks about the client side of the implementation.
I'm looking for the information about the server part and the networking part (how client get notified real time)
A user scenario might look like this:
- something happens for user-a
- server creates a message for user-a in DB (for persistance) : I'm using django-activity-stream for this
- server sends (new or last 10) messages to user-a's browser (when user-a logs in or when event happens)
- browser displays the message (Notify panel similar to stackoverflow's part)
- if user acknowledges the message(clicking the inbox in SO), all the unseen messages are marked as read and recorded in server
I have questions on the following steps.
- (3) Not sure but https://github.com/stephenmcd/django-socketio could be used.
- (4) The answer to the question says client has the json data received from server.
Does server send messages to user for every request?
Does client check local storage(I'm new-to-web, what's a good local storage for this purpose?) and request the json data if he doesn't have them in the local storage? - (5) How should I implement this
seen
andunseen
? django-activity-stream doesn't have notion of them.