Design of Yelp

Lesson 129 of 25610 min readPremium lesson preview
In this lesson2 sections

Design of Yelp

Connect a spatial index to authoritative business records. The index finds candidate place IDs; the record store supplies current details, and an aggregator applies the query’s filters and ranking rule.

Following the requirements and estimations from the previous lesson, we will now focus on the API design, storage schema, and system building blocks.

API design

This section outlines the API endpoints for the system.

The search function locates places based on categories (e.g., “cafes”):

search(category, user_location, radius)
ParameterDescription
categoryThis is the type of search the user makes, for example, a search for restaurants, cinemas, cafes, and so on.
user_locationThis contains the location of the user who’s searching with Yelp.
radiusThis is the specified radius where the user is trying to find the required category.

Return a paginated list of matching places within the requested radius, including name, address, category, rating, and a thumbnail reference. Specify coordinate format, distance units, maximum radius, and deterministic ordering so a query can be repeated or continued.

To search for a specific place by name (e.g., “Burger Hut”):

search(name_of_place, user_location, radius)

The rest of this lesson is for Premium members

Premium opens every lesson in this course, along with all questions and solutions on PracHub.