• notice
  • Congratulations on the launch of the Sought Tech site

How to understand the control of idempotence when generating orders?

I often hear people say that in the trading system, there are two controls when generating orders: one is idempotent control, and the other is concurrency control.
My understanding is this.Concurrency control can be achieved from the database level by using row operations in the lock table and distributed locks to achieve concurrency.What about idempotence? I checked some information about the understanding of the concept of idempotence, or the more I look at it, the more vague, is there any popular explanation for idempotence? In addition, how to control idempotence in the order-generating system?
So my question is:
1.How to understand idempotence in a popular way?
2.How to achieve idempotent control in the project to prevent order fragmentation? ?

Thank you~~


A:

Thank you~In fact, your understanding is wrong~I don’t know where you saw these materials...
actually...solve concurrency problems...not only a simple database lock can solve...it requires a series of caching and distribution., Filtering, etc.~
and idempotence is just a convention ~ it is agreed that the user is in the same operation ~ there is only one effective ~ for example, the user madly places an order ~ in fact only one effective...the solution is very simple ~ divided into 2 layers...The front-end control point can’t be clicked once...the back-end makes the request unique identification~ and then saves it in the cache~ after that, there is only one that really takes effect~

I feel that the questions you have asked these few times are more like what is said in a textbook.It is far from that in practical applications.It is recommended to pay attention to some articles that are tired of science and technology.For example, the spike principle written by Taobao.Alibaba Cloud recently published high concurrency.The structure of the red envelope system and other dry goods summarized in actual production~



Tags

Technical otaku

Sought technology together

Related Topic

0 Comments

Leave a Reply

+