Change commands and retries
How are repeated and corrected partial area messages distinguished?
Scale alone does not ensure consistent retry behaviour. This proposed API binds the role, business object, change payload and expected state to each new intent. An idempotency key identifies the same intent after a response is lost.
Starting point Test 768 measurements/s as a catch-up profile.
Assumptions for the example case
Our own fictitious example design: Mechanical tillage of a field; a machine order; offline stored work record; local inspection of operational windows and approval. Figures and quality goals are illustrative test assumptions. Outside are plant protection product application, autonomous driving control, agronomic advice and payroll.
Retries and new intent
Offline job and device event
The event key deduplicates 5 ha; a change to 6 ha collides and the old proof retains G-4.
Proposed domain API contracts
- POST
/field-operationsAssign machine and field.
- Input
- Operations planning, F-141, G-4, M-141, activity, time window [06:00,12:00) UTC, start deadline 10:00 and key.
- Result
- E-141 with conflict-free machine binding and complete A-141.
- Retry behaviour
- An identical operation by the same authorised role on the same object, using the same key and canonical payload, returns the stored original result. A changed payload under that key is rejected. External result identifiers are durably deduplicated after authentication; new intents check the current version again.
- POST
/field-operations/{id}/acknowledgementsAcknowledge local receipt or revocation.
- Input
- Authenticated device,A-141,E-141, order digest, event identifier and reception mode.
- Result
- Permanent receipt; only documented withdrawal receipt ends local authority safely before deadline.
- Retry behaviour
- An identical operation by the same authorised role on the same object, using the same key and canonical payload, returns the stored original result. A changed payload under that key is rejected. External result identifiers are durably deduplicated after authentication; new intents check the current version again.
- POST
/field-operations/{id}/work-evidenceReport actual offline work.
- Input
- Machine operators, device sequence, A-141, G-4, M-141, start time, end time, 8 ha and work record.
- Result
- A proof of 8 ha,4 ha remain open; altered content under the same key generates conflict.
- Retry behaviour
- An identical operation by the same authorised role on the same object, using the same key and canonical payload, returns the stored original result. A changed payload under that key is rejected. External result identifiers are durably deduplicated after authentication; new intents check the current version again.
- GET
/field-operations/{id}Read plan, authority and actual status.
- Input
- Eligible operations planning or machine operators,E-141.
- Result
- Work order version, receipt acknowledgement, start deadline, work records and remaining area.
- Retry behaviour
- Repeating a read creates no business effect; the returned current state may change between requests.
Keep evidence content stable
Compare the device sequence and content together.
One device repeats 5 ha.
Area counts once.
- Alternative considered
- Only timestamps confuse correction and repetition.
- Trade-off
- Correction needs its own proof.
- Reassess
- Device change changes sequence contract.
Terms in this step
- Keep evidence content stable
- Area counts once.
Try it yourself
The same device receipt reports five ha twice and then six ha. Define takeover and conflict.
A hint for your attempt
Use the specific entities and conditions from this step. The two solution parts distinguish the decision from its evidenced outcome.
Compare with a possible solution
- First part of the solution
- The same repetition counts a total of five ha.
- Second part of the solution
- Six ha under the same event identity creates conflict. A real correction needs its own referenced proof.
Apply to your project
Which corresponding assumption in your project would you check first? Use as an occasion: Device change changes sequence contract.