Friday, October 26, 2018

System design Twitter


When we design a  system. we first need to list the features what we need.
Lets build the system feature by feature and later test for performance and improve on it.

Let us consider 3 features main features of twitter system
1.Tweeting
    This would have all the tweets
2.Timeline
    -User
       List of all the tweets within that timeline.Content of this would be less as this would be the list of
       tweets that the user has done at a particular timeline
    -Home
       List of all the tweets of the users whom we are following. Each users might have thousands of             tweets at a particular timeline.
3.Following
      These are the list of the users that we are following. This would not dynamically change and                would have less load on the system

System design Uber



Uber architecture relies on supply and demand.

  • Demand is for the user and supply is provided by the car
  • It uses a flat map from google to generate unique cell across the world regions
  • Each cell would have a  unique id
  • It would draw a circle that would have one or more cells as shown below