I’m building a local-first app that syncs with a remote API, and I keep wondering whether ordinary CRUD methods are the wrong abstraction. If a device is offline, a write may be accepted locally but not committed remotely; if another client changed the record, “success” may still leave us with a conflict. Retries add another wrinkle: after an interrupted request, repeating a side-effecting operation can execute it more than once unless the protocol is designed for that.
I’m tempted to expose states like locally accepted, pending, retrying, server-confirmed, stale, and conflicted as explicit SDK or language-level types. But forcing every application to understand queues and merge policies could make a simple API miserable. Would those affordances actually improve reliability, or just move distributed-systems complexity into every caller? I’d especially like concrete examples from people who have designed sync protocols, dealt with unreliable networks, or maintained APIs used by local-first clients.