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...
Reserve:
GET /reserve/v1/uid
List /reserve/v1/uid
POST /reserve/v1
Gate:
GET /gate/v1/rid/
POST /gate/v1/rid/checkin
POST /gate/v1/rid/checkout
Gateway: The entry point, also used for user authentication.
Reservation Service: Query the available parking slot from Database, and make reservation.
Queue: Reservation request is queued in Queue. Then fetch from Payment Service for processing.
Payment Service: Called 3rd party payment gateway to proceed the payment, and update the reservation status.
Gate Service: Update the reservation status when the physical car checkin/checkout.
User Table:
UID int
Reservation Table:
RID int
UID int
CarNumber Varchar
ParkingID int
Payment_status Varchar
ParkingLot Table:
Lotid int
id int
name Var
ParkingSlot Table:
Lotid int
StartTime date
EndTime date
ParkingID int
Status Varchar