Offline chat outbox
In an iOS chat app where the network drops often, messages the user sends must not be lost. How would you design the state transitions of the local outbox?
In an iOS chat app where the network drops often, messages the user sends must not be lost. How would you design the state transitions of the local outbox?
The moment the user taps send, store the message in a SwiftData outbox as pending, move it to sending when transmission starts, sent when the server acks, and failed past the retry limit, and on restart move any sending rows left by a crash back to pending so they go out again.
PersistenceShort answerAdvanced
Chat in a secondhand marketplace app has to work for reading and writing on the subway…
#chat #outbox #idempotency
iOS system designShort answerExpert
Design the iOS client for a 1:1 chat like WhatsApp. Focus on message ordering…
#chat #idempotency
iOS system designShort answerAdvanced
Assume the backend already exists and design a flight booking iOS app. The flow runs…
#offline #idempotency
iOS system designShort answerAdvanced
In a messenger app, what does the client have to guarantee so messages never get lost?…
#chat #outbox