Desired-State PUT and Toggle POST Retries
Desired-State PUT and Toggle POST Retries
Predict the two lamp states after a lost reply.
CoAPPUT /state · desired value ON
Client record
Target state: ON
Simulated lamp
OFF
POST /toggle
Client record
Target state: ON
Simulated lamp
OFF
PUT /state · desired value ON
Client record
No ACK received · No response received for the initial request
Simulated lamp
ON
POST /toggle
Client record
No ACK received · No response received for the initial request
Simulated lamp
ON
PUT /state · desired value ON
Client record
No ACK received · No response received for the initial request
Simulated lamp
ON
POST /toggle
Client record
No ACK received · No response received for the initial request
Simulated lamp
ON
Retransmission of the same CON
Receiver recognizes the duplicate within exchange scope and skips reapplication. Both main timelines hold at ON.
PUT /state · desired value ON
Client record
No ACK received · No response received for the initial request
Restarted · New application request
Simulated lamp
First execution: ON · Second result hidden
Simulation assumes execution of this new request.
POST /toggle
Client record
No ACK received · No response received for the initial request
Restarted · New application request
Simulated lamp
First execution: ON · Second result hidden
Simulation assumes execution of this new request.
PUT /state · desired value ON
Client record
No ACK received · No response received for the initial request
Restarted · New application request
Simulated lamp
ON
OFF → ON → ON
POST /toggle
Client record
No ACK received · No response received for the initial request
Restarted · New application request
Simulated lamp
OFF
OFF → ON → OFF
PUT /state · desired value ON
Client record
No ACK received · No response received for the initial request
Restarted · New application request
Simulated physical-state observation
ON
Simulated lamp
ON
OFF → ON → ON
POST /toggle
Client record
No ACK received · No response received for the initial request
Restarted · New application request
Simulated physical-state observation
OFF
Simulated lamp
OFF
OFF → ON → OFF
Application-level repeat detection
An application identifier and its retention policy can help the server recognize a repeated operation.
Start from separate lamps
Start with the lamp off in each scenario. The client wants it on.
Technical boundaries. Both lamps start OFF, and the scenario assumes each initial operation executes and its piggybacked ACK and response are lost. The same-CON example assumes recognition within the exchange. The restart path assumes the server executes each new request, and the final state check is simulated.