Estimate the scale of the system. Consider daily active users, read/write ratio, storage requirements, bandwidth, and any relevant QPS calculations...
Define the APIs expected from the system. This is your chance to analyze and define the read and write paths so that you can come up with the high-level design...
1) get api to show the ui for reserving the spot
2) resreving and locking the selected parking spot and saaving inn db once you get paymenet confirmation
3) payment integration trhough the razorpay
4) lodbalancer servier to handle the request and load on api servers
5) api gateway to handle the routing based on route path if pat is home page then another lb if the request is for payment or showing the available prking spot another lbs like that
6)caching server with cdn
Describe the overall system architecture. Identify the main components needed to solve the problem end-to-end. Use the diagramming tool to create a block diagram.
4) lodbalancer servier to handle the request and load on api servers
5) api gateway to handle the routing based on route path if pat is home page then another lb if the request is for payment or showing the available prking spot another lbs like that
6)caching server with cdn with ttl of 2 minutes since the data may get updated any tiem or else i will trigger updating the cache for certain location as soon as the parking spot data updates in that location
Define the data model. Identify the main entities, their attributes, and relationships. Consider the choice of database type (SQL vs NoSQL) and justify your decision based on access patterns...
1) parking spot collectio storing the parking spto with variable available or booked
2) expiry time duration also stored in the same collection
3) another collection storing the user data
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.
1) usre send the request to book a parking spot and do payment
2) the spot is maked asbooked in db and duration is give to that user
3) agenda runs every 5 mins to chekc the duration any duration of any user is about to complete then one ntofication is sent using sqs to user