What happens to a record when there is no network
The web app stores failed requests that modify data, that is POST, PUT and PATCH, in the browser's IndexedDB queue. The user does not lose the filled-in form, and the request waits in the device memory until the network returns.
When the network returns, the queue replays the requests one by one. From the user's point of view the record was saved at the moment of the click, while from the system's point of view it appears only at the moment of synchronisation. This difference matters for real-time reports, so it is worth describing in the instructions for shift supervisors.
Does the queue handle photos and attachments
Yes. The offline queue also handles files and forms, so a report with a photo of a fault taken on the shop floor does not need the attachment added again after leaving the building.
Duplicates: can a record be created twice
This is the most common concern. When the network drops during sending, the app does not know whether the server received the request. Sending it again could create a second record. That is why every request that modifies data gets an idempotency key in its header, and the server recognises the repeat and does not create a duplicate.
The server remembers only results that ended in success, 2xx. After an error 4xx or 5xx the key is released, so a corrected version of the request can be sent again. Idempotency records are cleared after 13 days by default, which limits their growth and still covers a long period of work without a network.
- An idempotency key in the header of every request that modifies data.
- Storing the result only on success, 2xx.
- Releasing the key after an error, 4xx or 5xx.
- Clearing idempotency records after 13 days by default.
Sequence of retry delays following the Fibonacci sequence
What the user sees and how retries work
The queue status is visible to the user: waiting, synchronising, error or login required. This way the employee knows whether the entry arrived and does not repeat it out of fear that it disappeared.
The delays between successive retries grow according to the Fibonacci sequence. At the start the app tries often, so that data is sent quickly after a short interruption, and during a longer outage it slows down so as not to load the network or the server.
Login required after a long break
If the session has expired, the request is not lost: it enters the login required state and waits for the user to sign in again. After signing in, the queue sends the outstanding records.
Working without signal and radio devices
The offline queue applies to the app in the browser. The LoRa radio watch works differently: it does not need Wi-Fi, because its frames pass through a gateway, and the gateway translates them into HTTP requests to the system. When the watch hears no beacon, the frame is still sent, and the system substitutes the last known location.
In practice the plant therefore has two layers: the app with a queue for forms and rounds, and the radio for SOS and inactivity. Each of them hides the gap in coverage from the user, within its own scope.
What the queue does not do
The queue does not replace reading data: without a network the browser will not fetch new lists or photos from the server if they were not loaded earlier. It also does not resolve business conflicts, for example two people editing the same record, so the process should avoid this organisationally.
The queue should not be the only proof of work performed in a high-risk process. For permits and critical confirmations the rule is that only the status after synchronisation is audit evidence, while an entry in the queue is only protection against data loss.
Video
Frequently asked questions
Can a record entered without a network disappear?
The request goes into the IndexedDB queue in the browser and waits for the network to return. The condition is that the user does not clear the browser data or sign out at the end of the shift without synchronising.
What if the server responds with an error?
After an error 4xx or 5xx the idempotency key is released, and the request appears in the queue as an error. It can be corrected and sent again.
When does the data reach the system?
When the network returns, in subsequent retries with increasing delays. Until then the record is visible only on the author's device.
Records without gaps in coverage
We will show in a live demo how the offline queue behaves when the network drops and after it returns. Let us arrange a short demonstration.
Let's talk