User interface for translating language
Able to translate inputted language into target language
Supports multiple languages
Able to detect input language
Able to serve thousands of request per second.
Able to support offline translation mode.
For this application, I would say the number of users would be in the millions, but daily usage would not be as high as other popular type of applications.
Even considering peak usage, where millions of request are made in short span, scaling this horizontally would not be a problem.
In terms of storage calculations, assuming daily active users of 10 million, peak usage could be 10,000 concurrent request.
Assume each request has 100 words on average and each request takes the translation algorithms 10 seconds to process.
Assume each request requires around 100 mb.
Based on these givens, the service seems to be computational intensive.
Therefore, we should utilize instances with high memory allocation that can handle the computational load of translating words.
translate(words, targetLanguage)
The translate APIs will take in an array of words and target language and returns the translated array of words.
Storage wise I would opt for no SQL database, given there's not really any need for transactional operations.
You should identify enough components that are needed to solve the actual problem from end to end. Also remember to draw a block diagram using the diagramming tool to augment your design. If you are unfamiliar with the tool, you can simply describe your design to the chat bot and ask it to generate a starter diagram for you to modify...
Explain how the request flows from end to end in your high level design. Also you could draw a sequence diagram using the diagramming tool to enhance your explanation...
Dig deeper into 2-3 components and explain in detail how they work. For example, how well does each component scale? Any relevant algorithm or data structure you like to use for a component? Also you could draw a diagram using the diagramming tool to enhance your design...
Explain any trade offs you have made and why you made certain tech choices...
Try to discuss as many failure scenarios/bottlenecks as possible.
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?