Designing for trucks that lose signal
An ELD cannot stop recording because LTE did. Everything downstream has to assume the data arrives late, out of order, and more than once.
A truck spends real hours outside coverage. The device keeps recording; the backend hears nothing. When the truck crests the hill, hours of buffered events arrive at once.
That shapes three decisions.
Device clock, not server clock#
The server's receive time is useless for compliance — it describes the network, not the driver's day. Every event carries the device's own timestamp, and the device's clock is disciplined against GPS rather than the OS.
Servers still record arrival time, but only for diagnostics.
Idempotent by construction#
Buffered uploads retry. Retries duplicate. Give every event a deterministic identity at the point of creation:
event_id = hash(device_id, monotonic_seq)
A monotonic counter rather than a timestamp, because two events can share a second but never a sequence number. Ingest becomes an upsert and replay is free.
Out-of-order arrival is normal#
Events are not a stream, they are a set that converges. Anything that computes over them — duty status, available hours — has to be recomputable from scratch for a given driver and day, rather than incrementally mutated as events land.
This is the expensive decision and the one worth making early. Incremental accumulation is faster and cannot be corrected when a late event changes the past. Recomputing a day is milliseconds, and it is always right.
| Approach | Late event | Duplicate |
|---|---|---|
| Incremental counter | Wrong until manually fixed | Double-counts |
| Recompute from events | Self-correcting | No effect |
What this buys#
A truck can be dark for eight hours and the system reaches the same answer it would have reached in real time. No reconciliation job, no correction workflow, no support ticket.
