Technical Design of a Warship Open Day Reservation System: End-to-End Booking and Verification Architecture
This article presents a technical analysis of a reservation system for large public open-day events such as warship open days, covering the full chain from booking to on-site verification. It examines the core challenges of high concurrency, time-slot constraints, real-name binding, and multi-location coordination; describes the overall system architecture including frontend, booking service, data storage, identity verification, and shuttle dispatch; and details practical designs for ticket release windows, capacity deduction with atomic operations, real-name validation and review workflows, on-site ID verification, rate limiting, caching, degradation, and monitoring. The article is intended for developers and architects who want to understand how to build fair, stable, and scalable reservation platforms for capacity-constrained public services.
Technical Design of a Warship Open Day Reservation System: End-to-End Booking and Verification Architecture
1. Background and Problem Definition
Reservation and entry management for large public open events, such as warship open days, is fundamentally a resource allocation problem characterized by high concurrency, time-slot sensitivity, and strict real-name binding. The technical challenges include:
- Resource scarcity: Visitor capacity is limited, and a large volume of requests may arrive the moment tickets are released.
- Time-slot constraints: Each day is divided into multiple visiting periods (for example, 8:30–11:30 AM and 14:00–17:30 PM), each with its own capacity limit.
- Real-name verification: Entry requires a second-generation resident ID card, and reservation information must exactly match the credential information.
- Multi-location coordination: Different cities and different wharves or scenic areas host separate visiting zones, and shuttle vehicle scheduling may be involved.
- Reservation windows: The booking channel is not open all day. It opens and closes at scheduled times, and tickets are released in batches.
This article uses a typical multi-location warship open event as an example to abstract a general reservation system design model and discuss key technical decisions.
2. Overall System Architecture
From a functional perspective, the reservation system can be divided into the following core modules:
+-------------------+ +-------------------+ +-------------------+| Booking Frontend | --> | Booking Service | --> | Data Storage || (Mini Program/H5) | | (API + Business) | | (RDB + Cache) |+-------------------+ +-------------------+ +-------------------+| | || v || +-------------------+ |+-------------> | Identity Verify | <-------------++-------------------+|v+-------------------+| Shuttle Dispatch |+-------------------+
2.1 Booking Frontend
The booking frontend is typically delivered through a social media menu, a mini program, or an H5 page. Its core responsibilities include:
- Displaying available dates, time slots, locations, and remaining capacity.
- Collecting real-name information (name, ID card number, contact details).
- Submitting reservation requests and displaying results.
- Providing a reservation credential (QR code or reservation code) for on-site verification.
2.2 Booking Service
The service side is the hub of the system and is responsible for:
- Capacity management: Maintaining total and used capacity for each location, date, and time slot.
- Ticket release strategy: Opening the booking channel at scheduled times according to predefined rules, and closing it when capacity is exhausted or the deadline is reached.
- Anti-abuse and rate limiting: Identifying and blocking malicious requests to preserve a normal booking experience for legitimate users.
- Reservation record management: Storing successful reservations, cancellations, review statuses, and related data.
2.3 Data Storage Layer
- Relational database: Stores structured data such as user information, reservation orders, and capacity configuration.
- Cache layer: Supports fast reads and atomic decrements for hot data such as remaining capacity, preventing the database from becoming a bottleneck.
- Message queue: Handles asynchronous processing of reservation requests, notification delivery, and verification result synchronization.
3. Detailed Design of the Reservation Flow
3.1 Ticket Release and Reservation Windows
Using the example event, reservation rules differ by region:
- Qingdao area: The reservation program goes live on April 15 at 12:00. Tickets are released once per day from April 17 to April 19. The booking channel opens at 12:00 and closes at 17:00 each day, and reservations end at 17:00 on April 19.
- Dalian area: The reservation program goes live on April 16 at 9:00. On April 16, the booking channel opens for April 25 event reservations; on April 17, it opens for April 26 event reservations.
The technical implications of this design are:
- Batched ticket release: Avoids excessively high instantaneous traffic caused by releasing all tickets at once.
- Scheduled channel open/close: Controls request concentration through time windows, facilitating operational monitoring and elastic scaling.
- Independent configuration per region: Requires the system to support multi-tenant or multi-activity configuration, where each activity can independently define release times, reservation periods, and capacity.
In implementation, a configuration center can manage these rules, for example:
{"activityId": "qd-2026-04","location": "Qingdao Port No. 3 Wharf","dates": ["2026-04-22", "2026-04-23", "2026-04-24", "2026-04-25", "2026-04-26"],"timeSlots": [{"start": "08:30", "end": "11:30", "capacity": 500},{"start": "14:00", "end": "17:30", "capacity": 500}],"releaseSchedule": [{"date": "2026-04-17", "openTime": "12:00", "closeTime": "17:00"},{"date": "2026-04-18", "openTime": "12:00", "closeTime": "17:00"},{"date": "2026-04-19", "openTime": "12:00", "closeTime": "17:00"}]}
3.2 Capacity Deduction and Concurrency Control
Capacity deduction is the part of a reservation system most prone to overselling. Common technical approaches include:
- Database optimistic locking: Checks a version number or remaining quantity when updating capacity, suitable for scenarios with moderate concurrency.
- Redis atomic decrement: Uses the atomicity of
DECRorINCRto deduct capacity in cache first and persist asynchronously. A distributed lock or Lua script is needed to guarantee atomicity of the “check + deduct” operation. - Segmented inventory: Splits total capacity into multiple sub-inventories stored on different cache nodes to reduce single-point pressure.
A typical Lua script example for atomic check-and-deduct:
-- KEYS[1]: inventory key-- ARGV[1]: quantity to deduct-- ARGV[2]: current timestamp (used to determine whether within the reservation window)local stock = tonumber(redis.call('GET', KEYS[1]) or '-1')if stock < 0 thenreturn -1 -- inventory not initialized or exhaustedendif stock < tonumber(ARGV[1]) thenreturn 0 -- insufficient inventoryendredis.call('DECRBY', KEYS[1], ARGV[1])return 1 -- deduction succeeded
3.3 Real-Name Information and Review
Reservations require real-name information, and entry with a second-generation resident ID card is permitted only after review approval. This requires the system to:
- Validate ID card number format and enforce uniqueness (the same credential can reserve only once for the same activity and time slot).
- Support review status transitions: pending review → approved / rejected.
- Generate a reservation credential after approval and bind it to the ID card number.
The core table can be designed as follows:
CREATE TABLE reservation (id BIGINT PRIMARY KEY AUTO_INCREMENT,activity_id VARCHAR(64) NOT NULL,location_id VARCHAR(64) NOT NULL,visit_date DATE NOT NULL,time_slot VARCHAR(32) NOT NULL,id_card_no VARCHAR(18) NOT NULL,real_name VARCHAR(64) NOT NULL,phone VARCHAR(20),status TINYINT NOT NULL DEFAULT 0, -- 0 pending, 1 approved, 2 rejected, 3 cancelledticket_code VARCHAR(64),created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,UNIQUE KEY uk_activity_idcard_slot (activity_id, id_card_no, visit_date, time_slot));
The unique index uk_activity_idcard_slot effectively prevents the same credential from reserving the same time slot more than once.
4. Shuttle Dispatch and On-Site Verification
4.1 Shuttle Locations and Vehicles
In the Dalian area, for example, visitors must travel to a shuttle location for ticket verification and then take a shuttle bus to the event site. Ticket verification and departure times are divided into four batches:
- 7:20–7:50
- 9:20–9:50
- 13:20–13:50
- 15:20–15:50
After the visit, visitors must take the shuttle bus back to the shuttle location.
From a technical perspective, shuttle dispatch involves:
- Verification terminals: Mobile verification devices deployed at shuttle locations scan reservation codes or read ID cards to validate reservation status in real time.
- Vehicle scheduling: Dynamically arranging shuttle bus trips based on the number of verified visitors in each time slot.
- Return management: Ensuring visitors return in batches to avoid delays or stranded visitors.
The core logic of a verification terminal can be abstracted as:
def verify_ticket(ticket_code, id_card_no, activity_id, current_time):reservation = query_reservation(ticket_code, activity_id)if not reservation:return {"ok": False, "reason": "Reservation not found"}if reservation.status != STATUS_APPROVED:return {"ok": False, "reason": "Reservation not approved"}if reservation.id_card_no != id_card_no:return {"ok": False, "reason": "Credential information mismatch"}if not in_time_window(reservation.time_slot, current_time):return {"ok": False, "reason": "Outside the reserved time slot"}mark_checked_in(reservation.id)return {"ok": True, "message": "Verification passed"}
4.2 ID Card Verification
On-site verification relies on second-generation resident ID card readers. The system must integrate with verification devices, read ID card information, and compare it with reservation records. Key points include:
- Offline disaster recovery: When the network is unstable, verification terminals should support local caching of reservation data and synchronize verification results after the network recovers.
- Anti-counterfeiting and consistency: Ensure that the person, the credential, and the reservation all match.
- Fast throughput: A single verification should complete within hundreds of milliseconds to avoid queue congestion.
5. Engineering Practices Under High Concurrency
5.1 Rate Limiting and Anti-Abuse
Traffic at the moment of ticket release may far exceed the system’s normal load. Common measures include:
- Gateway rate limiting: Rate limits based on IP, user ID, or device fingerprint.
- CAPTCHA: Graphical or SMS verification codes before reservation submission to increase the cost of scripted ticket grabbing.
- Queueing mechanism: Placing requests into a queue and processing them in order to prevent the backend from being overwhelmed instantaneously.
- Blacklist: Temporarily blocking IPs or accounts with abnormally high request frequency.
5.2 Caching and Degradation
- Hot data caching: Caching capacity and activity configuration data in Redis to reduce database pressure.
- Page staticization: Using CDN acceleration for static content such as activity introductions.
- Degradation strategy: When core services are unavailable, degrading to a “view only, booking unavailable” or “please try again later” message.
5.3 Monitoring and Alerting
- Business metrics: Reservation success rate, capacity consumption rate, review approval rate.
- System metrics: API response time, error rate, cache hit rate, database connection count.
- Alert rules: Notifying operations staff promptly when capacity consumption is abnormal, API error rates spike, or response times exceed thresholds.
6. Conclusion
Although the warship open day reservation system addresses a specific scenario, its technical core is universal: fair allocation under limited resources, identity verification under real-name requirements, coordinated dispatch across multiple locations, and stability assurance under high concurrency. Through sound architecture design, caching strategies, atomic operations, and rate limiting, it is possible to build a reservation platform that meets business requirements and delivers a good user experience.
For developers, understanding the design approach of such systems not only helps with similar projects but also provides a reference for other resource reservation systems, such as venue booking, event registration, and public service appointments.
