System requirements
Functional:
- User should be able to make reservation to book the park lot if available
- User could get the park lot location and available in real time
- Each park lot has a detail information like space (large or small) for different cars. or if this park is for disabled individuals
- We should also highlight if this park has charge stations.
- We should allow user to book a park lot in advance.
- We should integrate with payment system to pay the parking fee
- User could cancel their parking if they could not arrive in time.
- We will keep the parking lot 15 minutes after the reservation time and cancel it automatically.
- User would get their notification if their reservation is success.
List functional requirements for the system (Ask the chat bot for hints if stuck.)...
Non-Functional:
List non-functional requirements for the system...
- System should be high availability
- System should handle the case of concurrent like different user book the same park lot in same time
- We should consider future growth of users and scalability
- We should keep our data security
- We should keep a low latency for book reservation and get the response of availability
- Let's assume the daily active user is 100000
- We assume only 80% of them will try to book a park, and all of them will get the park information at least 5 times.
- So the estimation write traffic would be 100000*0.8=80000 per day = 50 per minutes. and read traffic would be 100000*5 per day = 350 per minute = 6 per second
- Consider future growth, let's double the traffic, the write traffic would be 100 per minute = 2 per second. the read traffic would be 6*2=12 per second
- Consider there may be traffic spike in holiday, let's double again , so the peak write traffic in future would be 4 per second and read traffic would be 20 per second
- Let's go to the storage capacity, assume each reservation record cost 1KB, we take 4 record request per second , so daily record would be 24*4*3600*1KB=345MB, if we keep one replica, it should be 700MB, so yearly storage would be 700*365 = 255GB. we keep 4 year data retention for analysis, we need 1TB storage.
API design
Define what APIs are expected from the system...
Database design
Defining the system data model early on will clarify how data will flow among different components of the system. Also you could draw an ER diagram using the diagramming tool to enhance your design...
High-level design
You should identify enough components that are needed to solve the actual problem from end to end. Also remember to draw a block diagram using the diagramming tool to augment your design. If you are unfamiliar with the tool, you can simply describe your design to the chat bot and ask it to generate a starter diagram for you to modify...
Request flows
Explain how the request flows from end to end in your high level design. Also you could draw a sequence diagram using the diagramming tool to enhance your explanation...
Detailed component design
Dig deeper into 2-3 components and explain in detail how they work. For example, how well does each component scale? Any relevant algorithm or data structure you like to use for a component? Also you could draw a diagram using the diagramming tool to enhance your design...
Trade offs/Tech choices
Explain any trade offs you have made and why you made certain tech choices...
Failure scenarios/bottlenecks
Try to discuss as many failure scenarios/bottlenecks as possible.
Future improvements
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?