Auto Complete

Auto Complete or Type Ahead System Requirements

Auto Complete or Type Ahead High Level Design

The system can be broadly classified into two flows:

Request Flow

Data Collection Flow

Auto Complete or Type Ahead Low Level Design

Request Flow

AutoComplete

Scaling

Let’s say with time our data grows and it can’t be fit in one trie node. So we will split the data into multiple nodes and Zookeeper entry will look like:

Data Collection Flow

API data(phrase, weight)
Aggregator: It will aggregate the data for a period of time (e.g. 2m) and then flush data into the DB.
DB Schema

Phrase Time Sum of Weights
bat 1 Oct 434343
bat 2 Oct 7546534
bat 3 Oct 643264
bat 4 Oct 1:00 765
bat 4 Oct 2:00 868

Data Optimization

Appliers

References

System design : Design Autocomplete or Typeahead Suggestions for Google search

SUBSCRIBE TO NEW CONTENT

Tutorials on System Design, BlockChain, Design Patterns and more sent out once a week.

Loading comments...