Ideological foundation for distributed systems

Disclaimer: if not more, in essence https://blog.csdn.net/qq_29857681/article/details/90516739

 

 

Distributed Lock 

redis method of getset


Distributed Cache

repeat


Distributed Search

IS


Distributed Transaction

TCC  

Here Insert Picture Description

Asynchronous message

The basic idea is this:

Message producers, the need for additional build a message table, and records the message transmission status. Message table and business data to be submitted in a single transaction, which means that they want in a database inside. The message is then sent to the messages through MQ consumer. If the message fails, retry transmission.

News consumer, need to deal with this news, and complete their business logic. At this point if the local transaction processing is successful, indicating that treatment has been successful, if the process fails, it will retry execution. If a failure of the above operations, a service may be transmitted to the production side of the compensation message informing producers to rollback operation.

Production and consumers scanning timing of the local table message, the message is not processed or a retransmission failure message again. If automatic account reconciliation logic complement fly, this embodiment is very practical.


Distributed Storage

sharding-jdbc

For wareId, skuId hash modulo

Each library is divided into 4 libraries

128 points for each table Table

Each table data 20 million, more than 100 billion data


Distributed Computing

spark lot

 

Guess you like

Origin blog.csdn.net/qq_29857681/article/details/90516739