Method and system for realizing distributed transactions

A distributed transaction and transaction technology, applied in the field of microservices, can solve problems such as inconsistency, not allowing other nodes to access, and data inconsistency

Inactive Publication Date: 2019-10-18
BEIJING SOHU NEW MEDIA INFORMATION TECH
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0013] The main problem of the 2PC scheme is that during the execution of distributed transactions, all node resources participating in the transaction are locked, and the system does not allow other nodes to access the locked resources. It is difficult to further improve the execution efficiency of the system under such execution ; When submitting in the second step, participants are not allowed to make mistakes. If messages are lost, etc., it will lead to data inconsistency
[0022] In 2PC, only the coordinator sets the timeout (that is, the

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for realizing distributed transactions
  • Method and system for realizing distributed transactions
  • Method and system for realizing distributed transactions

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0064] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0065] Such as figure 1 As shown, it is a method flowchart of Embodiment 1 of a method for implementing distributed transactions disclosed in the present invention, and the method may include the following steps:

[0066] S101. The transaction initiator node applies to the version management center for a globally unique and incremental version ID;

[0067] When a distributed transaction needs to be implemented, in the preparation stage, the transaction initia...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method and system for realizing a distributed transaction, and the method comprises the steps that a transaction initiator node applies for a globally unique and increasing version ID from a version management center, and the version management center sets the state of the version ID as a starting state; the transaction initiator node sends the version ID to the transaction participant node, and when the transaction participant node processes the data, the version ID is attached while the data is stored; and the transaction initiator node judges whether the latest successful state version ID of the data operated by the transaction participation node is smaller than the version ID held by the current transaction or not after the data processing of the transaction participation node is finished, and if so, the version management center updates the version ID state to be a successful state. According to the invention, the consistency of data between different services in a micro-service architecture is realized.

Description

technical field [0001] The present invention relates to the technical field of microservices, in particular to a method and system for realizing distributed transactions. Background technique [0002] Microservice is a very popular architectural style nowadays. It splits a large and complex software application into a group of small, interconnected microservices. Each service implements specific functions and can be deployed independently. Services are loosely connected. coupling. [0003] In the microservice architecture, an operation is jointly completed by a group of different microservice operations, and it is necessary to ensure that this group of operations either all succeed or all fail, which requires a distributed transaction mechanism to provide protection. Simply put, distributed transactions are to ensure the data consistency of different services. [0004] The existing distributed transaction schemes and their existing problems are as follows: [0005] 1) 2PC...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F9/46
CPCG06F9/465G06F9/466
Inventor 翟东波陈逸鹏
Owner BEIJING SOHU NEW MEDIA INFORMATION TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products