Expected duration: 1 - 2 weeks I'm looking for a high and low level technical design document for a particular use case. I do not expect any development but just the document.
Use Case - There are more than 650K publicly traded companies across the globe. I am looking for an autocomplete feature that can search across these 650K records and with less than 100ms latency could suggest a user.
1) There are two different values that needs to be searched and displayed - Symbol of the company and the company name itself.
For example - if user types "Mo" the result should show any symbol that contains MO or firms with "Mo" in their text i.e. "Exxon Mobil", "JP Morgan", "Ford Motor Company".
2) We also need to maintain a ranking system for every firm, so if "Ford Motor" is selected most time, any regular expression that matches "Ford Motor" should be ranked first.
Please visit https://finance.yahoo.com/ and search for any firm. Its precisely what I am looking for.
The backend must have Java and Angular JS as frontend but any other software component is fine. Eg. Trie data structure, Redis Cache, Oracle/MySQL database or any messaging queue - you are free to use any component you wish. However, the only constraint is that it cannot be a component from a Cloud provider. Assume this to be an on-premise deployment.
Also, assume that this will be accessed by 10M (million) users during its peak so scalability will be a huge aspect along with failover. As per the research, autocomplete must respond with 100ms latency for best user experience. All these considerations would be hugely important.
As an artifact/deliverable, I am looking for both higher and lower level details of the architecture. For example - when a user types the first character which AJAX call does it make? Is there a load balancer that accepts the request? Where does the request routes to and which service? What are the parameter of those service? Which caching mechanism would be used? Would you preload all the data?
Basically, every granular detail ! :) Again, just looking for a document with all the details.
I would be more than happy to discuss any questions you would have.