Twitter API Design Decisions
Learn the different design considerations in Twitter's API and the reasons behind them.
This lesson covers the design considerations that will help us design an effective API for a service like Twitter. Before getting into the details of those design decisions, we will need to understand the end-to-end architecture of Twitter. Let's discuss the workflow of how Twitter APIs work.
Design overview
The following illustrations demonstrate a high-level view of how users are able to interact with the back-end services. Some of Twitter's functional requirements (that we defined in the previous lesson) have already been covered in this course. Now, we are interested in the creation process of Tweets and the generation of timelines for different users. The Tweet service allows the creation and storage of new Tweets, whereas the timeline service generates the timeline by interacting with multiple components, such as timeline generation,
Home timeline: This consists of the most recent Tweets of its followers with recommendations (ads, trends, and people to follow).
User timeline: This consists of the Tweets, Retweets, and recommendations of a specific user.
Mentions timeline: This returns the top N Tweets in which the logged-in user (@username) is tagged.
Let's see the details of how Tweets are sent to the system and how it generates a timeline.
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.