Interview Question
SDE-2sTeam: IT
Country: United States
Interview Type: In-Person
This can be implemented very easily with DB which allows rule based replication like as implemented in NOSQL DB like HBASE or Casandra. The data metadata are stored in sub folders. We will have a folder for each country. New citizen from a given country will result in update of the file corresponding to the citizen folder. Since the organizaion is being run in several countries, the DB will be distributed. It is possible to synchronize the contents of the DB with other locations.
1. I think the users citizenship needs to be identified first. Using IP ? or Address ? There has to be some way.
- RangeRover January 25, 20162. What does Russia mean (communicating with Russia govt (webservice?) or your app writing to DB in Russia ?)
#russia govt webservice.
if its Russia govt service, we have no control on availability of their service. we need to store the data temporarily until we reach russia webservice. This can be done by using a queue or the app could store the user registration data temporarily on disk or on a different database. ( The idea is not to make the data public until the data is stored on russia govt database.)
# if app DB in russia,
we can create rules or strategy in the DB layer to choose the right db for storing the data.
The database in Russia can be a cluster of DB servers for high availability
4. For the user to access the services immediately, we could assign user to temporary account until the user data is release to the russia govt.