Interfaces
Offline identifiers preserve the time entry. Which conditions ensure a valid result?
Response loss triggers resending.
Starting point UTC instants make the time difference unambiguous.
Assumptions for the example case
A fictional maintenance operation with a defined qualification for each shift. The example requires 11 hours of rest between planned shifts; this is an exercise assumption and does not replace an employment-law review. All quantities, thresholds and operational objectives are illustrative assumptions.
Offline Event Contract
Offline Event Contract
Device and event identifiers determine retry identity; a correction is a separate operation referencing B-47.
Proposed domain contracts
- POST
/schichten/S-47/bestaetigungenConfirm the person's shift assignment.
- Input
- commandKey, person=P-47, startUtc, endUtc, qualification=Q-47, qualificationVersion, expectedPlanVersion
- Result
- Confirmed shift or conflict/lack of suitability.
- Retry behaviour
- Identical same outcome; other person under same key conflict.
- POST
/zeitbuchungenAccept an offline time entry.
- Input
- deviceId, eventId=B-47, person, occurredAt, kind=start|end, deviceSequence
- Result
- Durably accepted, associated or awaiting review.
- Retry behaviour
- Identical event once; altered timestamp with the same identifier conflict.
Offline identifiers preserve the time entry.
Device and event identifiers form the deduplication key.
Response loss triggers resending.
Read the saved result. Conflict; reasoned correction references B-47 separately.
- Alternative considered
- Timestamp alone collides with simultaneous events.
- Trade-off
- Devices shall store stable identifiers.
- Reassess
- Replacing a device requires a transfer contract.
Try it yourself
Check identical and modified timestamps under B-47.
A hint for your attempt
Response loss triggers resending.
Compare with a possible solution
- Identical
- Read the saved result.
- Changed
- Conflict; reasoned correction references B-47 separately.
Apply to your project
How does this principle apply in your own project: Offline identifiers preserve the time entry.