SyncController
|
How this works: 1. Client sends a list of new records (insert) and the ID and LastEdited timestamp of each existing record (check) 2. Server compares the "check" list with the db and generates 4 lists which it sends back to the client: a. send - records that appear to be newer on the client, so we're requesting the client hit us back with the full record b. insert - records that have been created on the server but weren't in the "check" list, so the client needs to add c. update - records that appear to be newer on the server, so the client needs to update d. delete - records that are in the "check" list with an ID but not present on the server. The ID means they have already been added to the server at one time, so odds are they've been deleted. Client should follow suit. |
EMPTY
|