Design a Parking Spot System

Received this as my system design

Design the high level design/app for building a parking system.

Given your location, you want the app to show you all the parking structures that are near you.
Within the parking structure, there are empty/open parking spots. Each parking structure near you will also display the number of open parking spots it is.
You are given a device that signals when a car enters and leaves a parking structure to track the number of open spots
The scale for this is that the parking structures are around the globe. We have 10s to millions of parking structures.
Note, this is not a OOD design of defining classes. This is a high level system design.

What is the flow of requests from the client to the db?
What kind of db would you use?
Important: Your car is continously moving. How do you continously refresh the nearby parking structures to display in your screen.
What if you want to zoom out to see more nearby parking structures? How do you handle that?
How would you optimize this so that if you have a user in India, or another country, it wouldn't send requests all the way to the server in USA? How do the servers talk to each other? How does the client talk to the servers?

Would love to hear people's answers here as this was my first system design interview and I'm not sure I did really good :(
And if there are any videos regarding this, that would be super great!

Comments (5)