Let's say I have a client variable counter. When I send a request to the server, I send this value to the variable and then increment it by one (for the next request to the server). The server monitors this counter independently and checks that the account sent by the client is 1 more than its own (server) copy of the account. This is all fine and dandy, but consider the following situation:
- The client sends, say, 23 to the server.
- The server receives 23, checks it, and increments its own counter to 23.
- The server returns an All-Okay code to the client
but -
On the way from the server to the client, the return code is corrupted. Thus, the client believes that the server has not updated its counter, and therefore it leaves the client counter at 23. From this point, the client and server are not synchronized.
Does anyone know of any reliable schemes that could work in the face of such possible corruption / errors?
Thanks
Cameron
source
share