Cars need to be able to enter the parking lot
cars need to be able to exit the parking lot
pay for parking X amount of time
when one parking lot is full, cars need to be directed to a different lot
100 cars per lot, scales infinitely
park car
pay for parking
exit lot
parked car:
car #
lot #
time parked
parking time allocated
parking lot:
lot #
# of available spots
# of spots utilized
database
APIs (park, exit, etc)
load balancer - balance which lot cars park
car requests parking
car assigned lot
car parks for X hours (as defined by payment)
car leavs lot
database = noSQL, this scales horizontally. One database per parking lot allows for easy scaling
Load balancer = check closest available parking lot, if full send to next available parking lot
database: could definitely be a SQL database for easy querying of who is parked and where. I like noSQL as reads don't need to happen that often and scaling is easy. We don't need to save records of cars that have previously been parked
Queue for parking/exiting is the main bottleneck
You never want users to have to search for their own place to park. Parking should always be assigned
Account for different types of cars (EVs etc)
overnight parking and specified lots for longer parking
Reserved parking or reserved spots