Question:
Design API to upload Driver location to server after every 3 secs and ability to check/search driver location (from any current / past trip) upto 30 days.
e.g.
driver1 started one trip on 25Mar and trip duration is 2 mins. So we will save 120 secs/ 3 = 40 times location info. Design API to upload this info to server. Keep in mind that 100k similar trip running parallel.
Now same driver1 completed multiple trips on 25th, 26th & 27th so on. Design API to fetch deriver1 location on particular time. e.g. Driver1 location on 26th Mar 3om
So now decide the Database to store this data so that we can fetch this info faster.
Assumption: Active trips 100K trips.
Suggest the technology used to upload the location data and database to store location information.
I suggested persistent connection to upload user location info and No Sql data base to store info.
Interviewer was not agree with this approach. Can anyone suggest me how to approch this question ?