Shared grocery list that syncs between phones
Your task
Design the sync behind a shared grocery list app. A household of 2 to 6 people shares one or more lists; anyone can add an item, check it off, change the quantity or delete it, and the others should see the change within a couple of seconds when online. People often edit in the store with poor signal, so the app must work offline and sync later. Now and then two members edit one item at once: one checks off milk while another changes it to two bottles. The app has 3 million households and about 40 million list changes a day. Describe the data model, the sync protocol, and how conflicting edits are resolved.
It covers
- Offline sync
- Field level merge
- Tombstones