Making Direct Messages Reliable and Fast

Making Direct Messages Reliable and Fast

How mobile apps make network requests look fast
Often, when someone is building a mobile app that wants to “mutate” state on the server (such as tell the server to send a message), they have their view layer initiate a network request. Direct’s Mutation Manager
Given the number of different network conditions we must operate within, and the number of product surfaces we must support, building a consistent retry and optimistic state policy is a difficult task. How the Mutation Manager Works
Direct’s Mutation Manager (or short: DMM) achieves these goals (and more) by creating a centralized service that owns the network requests, serializes them to disk for retries, and safely manages the flow of their resulting optimistic state.

Source: instagram-engineering.com