Menu

Post image 1
Post image 2
1 / 2
0

Flutter Outbox Pattern

DEV Community·Guim·26 days ago
#CJEeNbDR
#for#flutter#dart#record#final#action
Reading 0:00
15s threshold

Persistent, idempotent retries for writes that absolutely must reach the server. An Outbox is a durable queue, stored on the device, that holds the intent of a server-bound write. The user's action is recorded to the outbox first — synchronously, before the network call. A dispatcher then drains the queue: every time the app starts, every time connectivity is restored, every time the user resumes the app, and once eagerly right after the action is enqueued. If the request succeeds, the entry is deleted. If the request fails transiently (no internet, server 5xx, timeout), the entry stays. If the request fails permanently (the resource doesn't exist, the input is invalid), the handler drops it. The user, meanwhile, gets immediate feedback as though the operation already worked — because, from the app's point of view, the commitment has been made.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More