Unlock instant, AI-driven research and patent intelligence for your innovation.

Distributed database middleware solution method

A solution, database technology, applied in the field of computer databases, can solve problems such as high access costs, inability to cope with high concurrency of the Internet or long transaction scenarios of complex systems, and achieve the effect of ensuring strong consistency

Pending Publication Date: 2021-02-23
BEIJING SIMULATION CENT
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] Strongly consistent transactions based on XA are relatively simple to use, but they cannot cope well with the high concurrency of the Internet or the long transaction scenarios of complex systems; flexible transactions require developers to modify the application, the access cost is very high, and developers need to do it themselves Implement resource locking and reverse compensation

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
  • Distributed database middleware solution method
  • Distributed database middleware solution method
  • Distributed database middleware solution method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment approach

[0075] The implementation method of the present invention based on the XA two-stage transaction is as follows:

[0076] S101: start the global transaction;

[0077] When receiving set autoCommit=0 from the access terminal, XADCSTransactionManager will call the specific XA transaction manager to start the XA global transaction and mark it in the form of XID;

[0078] S102: Execute real sharding SQL;

[0079] After XADCSTransactionManager registers the XAResource corresponding to the database connection into the current XA transaction, the transaction manager sends the XAResource.start command to the database at this stage; all SQL operations before the database receives the XAResource.end command are marked as XA transactions;

[0080] E.g:

[0081] XAResource1.start##Enlist stage execution

[0082] statement.execute("sql1"); ##Simulate the execution of a fragmented SQL1

[0083] statement.execute("sql2"); ##Simulate the execution of a fragmented SQL2

[0084] XAResource1....

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

One embodiment of the invention discloses a distributed database middleware solution method. The method provides a unified distributed transaction interface for a local transaction, a two-stage transaction and a flexible transaction by integrating existing mature transactions, and the integrated transactions include an XA-based two-stage transaction and an SEATA-based flexible transaction; whereinthe XA-based two-stage transaction integrates an XA transaction and a two-stage transaction; and the SEATA-based flexible transaction is integrated with a Seat AT transaction in an SEATA framework. According to the method, existing mature transactions are integrated, a unified distributed transaction interface is provided for local transactions, two-stage transactions and flexible transactions, and the defects of a current method are overcome.

Description

technical field [0001] The invention relates to the field of computer databases, in particular to a distributed database middleware solution. Background technique [0002] In the popular environment of distributed applications based on microservices, more and more application scenarios require access to multiple services and corresponding multiple database resources to be included in the same transaction, and distributed transactions have emerged. In a distributed application scenario, it becomes a constraint on system performance. How to make the database meet the characteristics of ACID in a distributed scenario or find a corresponding alternative method is the key solution direction of distributed transactions. At present, the solutions to transactions mainly include local transactions, two-phase commit transactions, and flexible transactions. [0003] Local transactions: without opening any distributed transaction managers, let each data node manage its own transaction...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/54G06F9/48G06F16/27
CPCG06F9/542G06F9/4843G06F16/27
Inventor 甄慧斌
Owner BEIJING SIMULATION CENT