0% completed
Designing Yelp or Nearby Friends
Every case study in this chapter follows the same seven steps from System Design Interviews: A step by step guide, and builds its design from the components in the System Design Master Template. Keep both open beside you, and try each problem yourself before reading the solution.
.....
.....
.....
Sam
· 4 years ago
When we talk about "partitioning the QuadTree", are we talking about actually storing different nodes in the tree on different servers? If yes, what would be a good way to decide which nodes are stored on the same server? I feel "sharding based on location id" is kinda confusing, because location ids will only appear on leaf nodes, right?
Junaid Effendi
· 4 years ago
Some chapters uses mysql as a db, I wonder how would it it scale to support since it does not support horizontal scaling, is nosql the end goal to achieve scalability.
Junaid Effendi
· 4 years ago
The idea behind data sharding and LB is almost same in these chapters.
My question is: Why LB is always saying more intelligent solution rather than naming a good solution, like consistent hashing on ip may be?
Second even hash on LocationID would need consistent hashing, if you have 10 static servers we can do LocationID % 10, but what if server size increases?
In either one: a. Sharding based on regions b. Sharding based on LocationID
The end goal is consistent hashing.
User
· 4 years ago
How is the correct path chosen through the quad tree for a user's location if the internal nodes are just storing pointers to its 4 children and doesn't include location information about its children?
Surbhi Goel
· 4 years ago
How is the index size for fixed size grid (4 * 20M) + (8 * 500M) ~= 4 GB Shouldn't it be (4 * 20M) + ((8+8)* 500M) to include both longitude and latitude?
francesco.perna90
· 5 years ago
I don't understand how we set grid size.
"Grid size could be equal to the distance we would like to query since we also want to reduce the number of grids".
The distance "we would like to query" is the radius ?
Thanks.
George
· 5 years ago
How is a quad tree persisted/stored? Is the search done directly on a DB (if yes, an example would be great) or is it more like each servers builds a quadtree and keeps it in its memory on set up?
Furquan Amanat
· 5 years ago
In yelp design, I am unable to understand the Grid system. How does the logic knows Grid from the Long and Lat. When I look at the Query "Select * from Places where Latitude between X-D and X+D and Longitude between Y-D and Y+D and GridID in (GridID, GridID1, GridID2, ..., GridID8)" What I dont understand is how does GridID is being retrieved. Is that in the table for Long and Lat or some other way, I will appreciate an explanation in terms of how do System know the Grid when looking a specific Long and Lat location given that I dont see any relation between them from table structure or any other way
Atul
· 5 years ago
How can we use quadtree to search place within given radius since grids are of different sizes ?
Krispy Donut
· 5 years ago
Search is off course primary API, but a post API would also be necessary to create/update places.
Reading Progress
0%