What is a news feed, and what are the two basic ways to build one?
Sketch your own answer first, then compare it with the one below.
A strong answer
A feed shows a reader the recent posts of the accounts they follow, newest first.
Fan-out on write, or push, copies each new post into the inbox of every follower. Reads are one lookup. Fan-out on read, or pull, builds the feed when it is opened by fetching recent posts from each followed account. Writes are cheap and reads are heavier.
Sources
- Adam Silberstein, Jeff Terrace, Brian F. Cooper, Raghu Ramakrishnan (2010). Feeding Frenzy: selectively materializing users' event feeds.