Detailed Design of the Typeahead Suggestion System
Learn about the detailed design of the typeahead suggestion system.
Detailed design
Let’s go over the flow and interaction of the components shown in the illustration below. Our design is divided into two main parts:
- A suggestion service
- An assembler
Press + to interact
Suggestion service
At the same time that a user types a query in the search box, the getSuggestions(prefix)
API calls hit the suggestions services. The top ten popular queries are returned from the distributed cache, Redis.
Assembler
In the previous lesson, we discussed how tries are built, partitioned, and stored in the ...
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.