Recipient autocomplete in a team chat
Your task
Design the autocomplete that suggests people and channels when a user types after an @ sign, or in the "new message to" box, of a team chat app. The app has 8,000 company workspaces; most have under 500 members and 100 channels, and the largest has 40,000 members. Suggestions should appear within 50 ms of each keystroke, match first names, last names, display names and nicknames by prefix, rank people the user messages often first, and never show members of another workspace or private channels the user is not in. Describe where the suggestion data lives, how matching and ranking work, and how it stays current when people join, leave or change names.
It covers
- Prefix matching
- Client side index
- Affinity ranking