Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method, device and system for maintaining data consistency and application server

An application server and consistency technology, applied in the database field, can solve the problem of inconsistency between database A data and database B data logic, and achieve the effect of ensuring consistency

Active Publication Date: 2015-12-16
BEIJING CHESHANGHUI SOFTWARE
View PDF5 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0016] It can be seen that according to the execution result of step S109, the operation on database A is successfully executed, but the operation on database B fails, because the operation on database A has been submitted to database A and cannot be rolled back, which will cause the data in database A to be inconsistent with database A. B data is logically inconsistent

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, device and system for maintaining data consistency and application server
  • Method, device and system for maintaining data consistency and application server
  • Method, device and system for maintaining data consistency and application server

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0034] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0035] figure 2 A flow chart of a method for maintaining data consistency according to an embodiment of the present invention is shown. The method is executed in an application server (such as a Web server), and is suitable for writing business data into a database A and a second database B at the same time.

[0036] refer to figure 2 , the method begins with step S201. In step S201, a database connection A with database A is c...

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 for maintaining data consistency. The method is executed in an application server and is suitable to be used for simultaneously writing service data into a first database and a second database. The method comprises the following steps of: creating first database connection with a first database, starting a first database transaction under the first database connection, and executing first read-write operation on the first database so as to write service data into the first database; creating second database connection with a second database, starting a second database transaction under the second database connection, and executing second read-write operation on the second database so as to write the service data into the second database; and when a first operation result corresponding to the first read-write operation and a second operation result corresponding to the second read-write operation are both successful, respectively executing the submitting operation on the first database transaction and the second database transaction. The invention also discloses a device and a system for maintaining the data consistency corresponding to the method and the application server.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a method, device, system and application server for maintaining data consistency. Background technique [0002] Due to the performance and capacity limitations of a single database server, when the business develops to a certain extent, the business data has to be segmented so that the business data is stored in multiple databases of multiple database servers. [0003] When the business needs to write data to multiple databases at the same time, if some databases fail to submit, while other databases submit successfully, there will be inconsistency in business data, resulting in errors in the final stored data that cannot be guaranteed to be consistent. cause loss. [0004] figure 1 It is a flowchart of simultaneous operations on two databases in the prior art. Such as figure 1 As shown, the web server needs to perform cross-database operations and write business data to da...

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): G06F17/30
CPCG06F16/27G06F16/275
Inventor 李林
Owner BEIJING CHESHANGHUI SOFTWARE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products