Implementation of rocketmq distributed transaction

1. Transaction scenario Scenario: ICBC user A transfers 10000 yuan to CCB user B; Steps: 1. ICBC system sends a synchronization message M to Broker, which increases the payment of RMB 10000 to B2. After the message is successfully received by the Broker, send a successful ACK to the ICBC system3. ICBC system will deduct 10000 yuan from u ...

Posted by Blockis on Fri, 11 Feb 2022 12:45:16 +0100

Primary key generation strategy

Primary key generation strategy 1. What is a primary key? Primary key, that is, primary key, is the candidate key selected as the unique identification of the row of the table. A table has only one primary key. A primary key can also be called a primary key. A primary key can consist of one field or multiple fields, which are called sing ...

Posted by Ehailey on Fri, 11 Feb 2022 04:04:00 +0100

SpringCloud learning notes 01

1, Introduction, chat and course description 1. Course content (SpringCloud + SpringCloud alibaba) 2. Technical requirements      java8+maven+git,github+Nginx+RabbitMQ+SpringBoot2.0 3. Listen to the audience and climb the stairs at the beginning Students: Zero foundation + non subject class + liberal arts sister JVM/JUC/GC/Nginx... Stage ...

Posted by Simon Mayer on Thu, 10 Feb 2022 21:13:50 +0100

A series of tough interviews -- what's the difference between redis distributed locks and zk distributed locks?

  Tags: [advanced] [Redis] [ZooKeeper] 1. Ask What is the difference between redis distributed locks and zk distributed locks? 2. Analysis This question has high requirements for the interviewer. It should not only understand the implementation method, but also master the principle. So the answer to the question is divided into many levels ...

Posted by alvinchua on Wed, 09 Feb 2022 13:55:27 +0100

Oversold 100 bottles of Feitian Maotai! Is it because Redis distributed locks are improperly used?

Using distributed locks based on Redis is nothing new today. This article is mainly based on the accident analysis and solution caused by redis distributed lock in our actual project. The rush purchase orders in our project are solved by distributed locks. Once, the operation conducted a rush purchase activity of Feitian Maotai, with 100 bott ...

Posted by terandle on Wed, 09 Feb 2022 11:53:43 +0100

High performance message oriented middleware Kafka

Kafka was originally developed by Linkedin company. It is a distributed, partition and multi replica distributed message system based on zookeeper coordination. Its biggest feature is that it can process a large amount of data in real time to meet various demand scenarios: such as hadoop based batch processing system, low latency real-time sy ...

Posted by s.eardley on Mon, 07 Feb 2022 08:46:25 +0100

PyTorch multi card distributed training DistributedDataParallel usage method

PyTorch multi card distributed training DistributedDataParallel catalogue PyTorch multi card distributed training DistributedDataParallel 1.DP mode and DP mode (1) Single process multi GPU training mode: DP mode (2) Multi process multi GPU training mode: DDP mode 2. Pytoch distributed training method 3. Python base trainer (PBT) distribu ...

Posted by Rovas on Mon, 07 Feb 2022 04:29:55 +0100

Solution in high concurrency scenario and implementation of distributed lock

Idea 1: SQL optimization In order to specifically simulate the second kill scenario, assume that the inventory table is called stock, the commodity quantity is called num, and the new number calculated by the business code is new_num=num-1, the original SQL executed is: update stock set num=new_num where id = id=#{id}; We can improve SQL and ...

Posted by parth on Sat, 05 Feb 2022 09:42:00 +0100

ZooKeeper distributed lock case

catalogue  1. Distributed lock case implemented by native Zookeeper 1) Distributed lock implementation 2) Distributed lock test 2. Case of distributed lock implemented by cursor framework 1) Problems in the development of native Java API 2) Cursor is a special framework for solving distributed locks, which solves the problem ...

Posted by sitestem on Thu, 03 Feb 2022 20:46:02 +0100

Microservice architecture | 7.2 building OAuth2 security authentication using JWT token storage

preface <Spring Microservices in Action> Principle and practice of Spring Cloud Alibaba microservice "Spring cloud framework development tutorial in Silicon Valley of station B" Zhou Yang JWT provides specifications and standards for OAuth2 tokens, and JWT tokens can be customized; 1. Basic knowledge of JWT token storage 1.1 ...

Posted by Katmando on Thu, 03 Feb 2022 10:52:20 +0100