J
J
Jungles2020-06-06 20:41:22
Database
Jungles, 2020-06-06 20:41:22

There are many requests, but the object is one?

This is a common user question.
When you book a plane ticket, then if you start entering bank card details, then all other users who consider this place are thrown out.
So the question is, the speed of light is not finite, the signal processing speed is also, some user is corny closer to the processing server.
The question is why there are no failures. Nobody cancels the case that two or more users simultaneously choose a place, simultaneously start entering card data, and send a request at the same time.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2020-06-06
@Jungles

Such systems typically use optimistic locking. If two users check out the same seat at the same time, the last one to finish will receive a message that the seat is busy.

D
Dmitry Entelis, 2020-06-06
@DmitriyEntelis

Wow.
1. There is such a thing - an inventory-distribution system, also called GDS. There are historically 4 large aircraft in their aircraft: Amadeus, Galileo, Worldspan, Saber + there are a number of airlines that have invented their own bicycles. All airline tickets are entered into a specific single system that keeps records of them.
2. Within the framework of a monolithic system (in addition, not the most productive one), it is not difficult to make sure that there are no failures. Keywords for study: atomic operation, sql, transactions, isolation levels, cap theorem.
3. Specifically, in aviation there is the concept of overbooking - when more tickets are actually booked and redeemed than there are physically seats on the plane. It has no technological background, it is purely a business decision beneficial to airlines.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question