Ok, my question is a bit complicated, but it says:
I have a Python server that stores client sessions (written in JavaScript) and has a complete understanding of what the client currently stores in its state.
The server will constantly retrieve data from the database and check for any changes regarding the status of the client. JSON data; consisting mainly of lists and dicts. I need a way to send a response to a client telling him to change his data according to what the server has.
I reviewed:
- Sending a JSON-serialized recursively scattered dict of modified elements and never using lists is not bad, but I cannot use lists
- Send the entire client version of the client state to the client - costly and inefficient
- Find the hard way to the difference lists - painful and dirty
- Text scatter of two after reset as JSON - simple dumb
I am very excited and I will be grateful for any help with this.
UPDATE
I am considering sending zeros to the client to remove unnecessary data and remove the server from its client status version.
source share