Maintain a cache for each user’s home timeline—like a mailbox of tweets for each recipient user (see Figure 1-3). When a user posts a tweet, look up all the people who follow that user, and insert the new tweet into each of their home timeline caches. The request to read the home timeline is then cheap, because its result has been computed ahead of time.
- 1. Reliable, Scalable, and Maintainable Applications
- from Designing Data-Intensive Applications
- Publisher: O'Reilly Media, Inc.
- Released: March 2017
twitter solution for tweets queries