[Google System Design]Design a translation service like Google Translate

Basic requirements to get started:

  • english -> any one of a language for now
  • each word has only one meaning for now
  • high availabilty and low latency
  • around 100m translations every day
  • around 100k words for each language, how would u store it?

My approach was to use a trie, so i implemented addword() and searchWord(), but i was stuck at a point how to store it in a persistent store. I was not sure how to do but time is limited, so I came up with using NoSQL to store the prefix as key, the next character as child(e.g. one node as a parent, followed by 26 children, for english) in the NoSQL Database…

Actually, how should we store a trie in a database? I did some research and it seems like there is no general practice:(

Actually, I didn’t get to the followups, but I guess these would be the potential questions:

  • show different tenses(e.g. search drive , show drove, driven. search driven, show drive, drove)
  • support more languages

系统设计题怎么用算法的套路。。。还Trie,真是刷昏了