Large-scale photo feed pagination
An iOS app implements infinite scroll for a photo feed seen by hundreds of millions of users. How would you design the page key so duplicates and gaps stay low even when the server's ranking changes?
An iOS app implements infinite scroll for a photo feed seen by hundreds of millions of users. How would you design the page key so duplicates and gaps stay low even when the server's ranking changes?
The page key is an opaque cursor the server issues, encoding a ranking snapshot id and the last item's sort value rather than an offset. The client keeps one per feed kind, and dedups by the photo ids in the response when merging, so pages still join up even after the ranking has changed.
iOS system designShort answerAdvanced
Design an infinite-scroll feed screen like Twitter's from the iOS client's point of view…
#feed #pagination #cache
iOS system designShort answerBasics
For a mobile feed, would you paginate by offset or by cursor (keyset)? Justify it with…
#pagination #cursor
iOS system designMultiple choiceBasics
You're loading a feed with offset pagination. While the user is reading page 2, 3 new…
#pagination #cursor
iOS system designShort answerExpert
Design the comment feed page for a community app. Constraints: comments are shown flat…
#pagination #cursor