Method for ensuring data consistency under micro-service framework HTTP interaction mode

A micro-service and consistent technology, applied in the field of micro-service development, can solve problems such as difficulty in implementation, large impact on database performance, and inapplicability in the field of micro-service development

Inactive Publication Date: 2018-05-15
G CLOUD TECH
View PDF7 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In the case of high concurrency and involving many business modules, it will have a greater impact on the performance of the database;
[0011] 2. The microservice architecture mostly uses the HTTP protocol for communication between components. HTTP is difficult to implement for a protocol with complex semantics such as the XA protocol. Therefore, the above method is basically not applicable in the field of microservice development

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 for ensuring data consistency under micro-service framework HTTP interaction mode
  • Method for ensuring data consistency under micro-service framework HTTP interaction mode

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0033] See figure 1 Shown, basic steps of the present invention are as follows:

[0034] Step 1: The main business service calls the pre-operations of all slave business services;

[0035] Step 2: Record all slave business services in the activity manager;

[0036] Step 3: If all the pre-operations from the business service are successful or a pre-operation from the business service fails, then perform step 4, otherwise the execution transaction stops executing;

[0037] Step 4: If all the pre-operations of the slave business services are successful, the collaborator calls the confirmation operations of all the slave business services. If the confirmation operations fail, then roll back all the confirmation operations and execute the cancellation operation of the slave service business;

[0038] Step 5: If some of the pre-operations from the business service fail, then call all the cancellation operations from the business service. If the cancellation operation fails, then p...

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 relates to the technical field of micro-service development, in particular to a method for ensuring the data consistency under a micro-service framework HTTP interaction mode. The methodincludes the steps of calling pre-operations of all auxiliary business service through a main business service, recording all the auxiliary business service in a movement manager, continuing the business if the pre-operations of all the auxiliary business service succeed or the pre-operation of a certain auxiliary business service fails, otherwise, stopping executing the execution business, if the pre-operations of all the auxiliary business service succeed, calling confirming operations of all the auxiliary business server through a collaborator, rolling back all the confirming operations and executing canceling operations of the auxiliary business service if the confirming operations fail, calling the canceling operations of all the auxiliary business service if the pre-operations of part of auxiliary business service fail till canceling succeeds. The problem that a traditional two-stage submitted protocol is poor in performance and not suitable for a micro-service framework is solved, and the three simple semantic operations on the business service can be achieved and called.

Description

technical field [0001] The invention relates to the technical field of microservice development, in particular to a method for ensuring data consistency in the HTTP interaction mode of a microservice architecture. Background technique [0002] With the promotion of microservice architecture, more and more enterprises adopt microservice architecture to build their own business platforms. While the microservice architecture brings many benefits to business development, such as single responsibility, independent development and deployment, function reuse and system fault tolerance, etc.; The dependencies among them are more complex, which makes it difficult to guarantee data consistency. At present, under the microservice architecture, the two-phase commit protocol is generally used to ensure the strong consistency of data. The two-phase commit protocol is a distributed transaction model. This model mainly uses two-phase commit to ensure the integrity of distributed transactio...

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/2365
Inventor 莫展鹏季统凯
Owner G CLOUD 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