Summary,ExpectedNew Train Ticket Booking System:
1) ifu: Allow value to account
2) reservation method: the reservation is unsuccessful and the refund is returned to the account
3) add allocation rules: To solve the problem of priority for people who come home on special Chinese New Year holidays
(Last year, the priority for returning was lower than that for returning home.
What traffic is, at all, the most basic technical problem. Let's talk about the traffic provider SB)
4) added to the user credit evaluation system and linked to the allocation priority
5) supports ticket booking through PCs and smartphones, and gradually reduces ticket tickets (people who do not book tickets online)
6) The goal is that the user can complete the task within 10 minutes.Pre-Order (the ticket check function is not required or available)
Within 5 minutes ~ Whether the reservation is successful within 24 hours;
Whether the reservation is successful within one hour after the transportation resources are delivered during the non-ticket snatching period.
Saves meaningless time for queuing and screen swiping; takes care of the people to be taken care;
Make the most basic people more satisfied.
(The structural diagram will not be painted, and it is estimated that the people of the Ministry of Railways will not pay attention to this)
**************************************** *******************
Preface:
Recently, I often see that it is difficult to buy a ticket. as a technical expert, I am scolded once by TMD:
Will the ticket be added? There are always people who can buy it, and someone who can't buy it;
The ticket booking system cannot be designed in another way.
If I come up with something, I can easily buy tickets through text messages and websites;
By the way, the real name of the mobile phone is also implemented.
Abstract:
What are the problems with the existing Ticket Booking Scheme,
1) it is real-time and requires a lot of computing resources; it takes time to book tickets
2) technical difficulty: for example, querying the remaining ticket and deducting the number of locks all have great structural difficulties.
That is to say, parallel access is not a problem at all. The problem is that the processing time of a single user is too long,
The avalanche effect is caused by the excessive user stays in the same resource process on the website.
The final result is that 200 users are stuck on server A. If the session time is 20 minutes, server A basically crashes. Only when the monitoring process is cleaned up will the ticket not be paid (force the process to be cleared) occur)
What I want to solve is: avoid wasting people's time and always make meaningless queries,
Just give the passengers a ticket or not as required.
Moreover, there is no technical difficulty in implementing many other functions.
Body:
I don't know whether it's easy to think about, or whether it's complicated for experts to think about.
Experts from the Ministry of Railways are still unable to dial out the ticket sales plans;
The online ticketing system is much simpler.
After the Ministry of Railways is scolded, a simple and feasible solution is provided.
It is difficult to query the remaining tickets, prevent oversales, and prevent scalpers,
Another way of thinking, TMD is too easy to handle.
I. Overall Plan
1. normal situation: Make a reservation and pay the money --> automatically verify the rules in the background --> the original refund of money that does not meet the purchase restrictions -->
--> Remind the user that the reservation is successful (but not necessarily with a ticket) --> transport resources are provided and allocated based on the first-come, first-served, first-served, and optimized principle
--> Send an SMS notification to the user to get the ticket
2. the user does not get the ticket: it does not matter because the Ministry of Railways has received the money, so you can get it two hours before driving.
It's so convenient that you don't have to go to the station for one more ticket.
3. User refund: Will someone refund the ticket during the Spring Festival? If you leave, you can leave.
2. Front-end Website Design
You only need to make a reservation and do not need to check the remaining ticket. Therefore, the architecture can be easily implemented without the need for CDN.
Iii. Background Design
After the reservation, the backend will process it slowly and check that the resources are added to the server. Even if the backend server fails, the front-end users cannot feel it.
Transport resources are available. You can find out how many tickets are forwarded to the Internet, and then assign them according to the rules.
In this way, the background architecture must be flexible and can be designed flexibly.
The backend consists of the verification SERVER + the allocation SERVER + the ticket retrieval and tracking server.
If you have the qualification for allocation, the ID card must be unique, paid, and prioritized;
There is no complicated logic and no database table lock for one-vote distribution;
Because the locks required can be allocated, it is good to use a single thread for allocation.
You can process more than 1000 tickets in one second with 2 cores.
Iv. Possible Problems
1. Is there a massive amount of processing? No
2. Is there any peak pressure? No, there are very few things to deal with when booking
3. Can I book a ticket? There is no difference between booking and ticketing,
The key point is that the reservation can have complicated predictions, such as allowing automatic next trip or something;
Flexible. Do not do meaningless repeated submissions.
4. If an internal employee of the Ministry of Railways wants to cheat, any cheating method may be used.
V. Advantages
1. There is no problem with booking 10 years in advance, as long as the Ministry of Railways and passengers are willing. Future Goals: Personal Travel Management System
2. The front-end is lightweight and can be expanded as needed.
3. the backend can handle anything you like, and it is easy to monitor. If there is an exception, you can also handle it manually. Users cannot feel it.
4. In fact, such a system is launched. If you buy a ticket at home, you have to take a bus to get the ticket. Not enough people in the Ministry of Railways have less agent income.
6. Inspired by @ Nobel, the improved system is as follows:
1. Foreground:
PC: the front-end reservation system, authentication subsystem, online banking subsystem, Intrusion Prevention subsystem, and business Monitoring System
SMARTPHONE: modify the reservation system suitable for mobile phone features
(The system is expected to be very simple at the front-end. Generally, small companies do not have to come back, that is, add records to the database, and do not verify the rules without checking the remaining tickets)
2. Background
Ticket ownership server (with predicted qualifications), ticket distribution server, ticket receiving notification server, business monitoring system, resource management and distribution rule management system, etc.
3. Settlement
Develop a settlement management system to handle accounts, refund, refund, etc.
After the above analysis, it is concluded that Asp.net + SQL2008 can be easily implemented. Especially in the background, developing with C #. net is definitely an advantage.