←back to thread

768 points cyndunlop | 3 comments | | HN request time: 0.001s | source
Show context
pornel ◴[] No.43108545[source]
I wonder why timelines aren't implemented as a hybrid gather-scatter choosing strategy depending on account popularity (a combination of fan-out to followers and a lazy fetch of popular followed accounts when follower's timeline is served).

When you have a celebrity account, instead of fanning out every message to millions of followers' timelines, it would be cheaper to do nothing when the celebrity posts, and later when serving each follower's timeline, fetch the celebrity's posts and merge them into the timeline. When millions of followers do that, it will be cheap read-only fetch from a hot cache.

replies(5): >>43108664 #>>43108812 #>>43109007 #>>43110207 #>>43113811 #
locusofself ◴[] No.43108812[source]
Why do they "insert" even non-celebrity posts into each follower's timeline? That is not intuitive to me.
replies(2): >>43109032 #>>43111095 #
1. wlonkly ◴[] No.43111095[source]
Think of it as pre-rendering. Of pre-rendering and JIT collecting, pre-rendering means more work but it's async, and it means the timeline is ready whenever a user requests it, to give a fast user experience.

(Although I don't understand the "non-celebrity" part of your comment -- the timeline contains (pointers to) posts from whoever someone follows, and doesn't care who those people are.)

replies(1): >>43123037 #
2. locusofself ◴[] No.43123037[source]
Perhaps I misunderstanding, I thought the actual content of each tweet was being duplicated to every single timeline who followed the author, which sounded extremely wasteful, especially in the case of someone who has 200 million followers.
replies(1): >>43125469 #
3. TimK65 ◴[] No.43125469[source]
From the linked article: "Additionally, a reference to your post is 'fanned out' to your followers so they can see it in their Timelines."

So not the content, just a sort of link to it.