Scheme for achieving consistency of cache and DB data in asynchronous mode

A caching and asynchronous technology, applied in structured data retrieval, electronic digital data processing, database distribution/replication, etc., can solve problems such as inconsistency of cached database data, and achieve the purpose of ensuring user experience, not losing high efficiency, and ensuring consistency. Effect

Pending Publication Date: 2022-04-22
TIANYI ELECTRONICS COMMERCE
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] When modifying product data, due to multiple frequent modifications, due to network or other reasons, in the case of multi-threading, the final data in the cache database does not match our last modified data

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
  • Scheme for achieving consistency of cache and DB data in asynchronous mode
  • Scheme for achieving consistency of cache and DB data in asynchronous mode
  • Scheme for achieving consistency of cache and DB data in asynchronous mode

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0029] Such as Figure 1-5 , the present invention provides an asynchronous way to achieve the consistency of cache and DB data, including the following steps:

[0030] S1. Cache product information in caching middleware such as redis to reduce the number of requests to access the database, reduce the pressure on the database, and prevent the situation that the database connection is full due to excessive traffic;

[0031] S2. When the product information is modified, especially in the context of extremely frequent modifications, and the product is frequently accessed; at this time, in some extreme cases, there will be dirty data in the cache;

[0032] S3. Originally, the method of synchronously modifying the cache was used, but this method still caused dirty data to appear in the cache; therefore, an asynchronous method was used to modify the cache;

[0033] S4. The asynchronous method cannot guarantee that the message will not be lost, so the business DB is used to store th...

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 scheme for achieving consistency of cache and DB data in an asynchronous mode, commodity information is cached in cache middleware such as redis so as to reduce the number of times of requesting to access a database, relieve the pressure of the database and prevent the situation that database connection is full due to excessive flow. When the commodity information is modified, especially under the background that modification occurs extremely frequently, the commodity is accessed frequently; at this time, in some extreme cases, dirty data exists in the cache. According to the method, the consistency of the cache and the DB is achieved in an asynchronous mode, synchronous operation during cache and DB data synchronization is replaced by an asynchronous operation mode based on a message mechanism, high-flow and high-QPS scenes are mainly considered, the use experience of a user is guaranteed, the timeliness of information is guaranteed, and the user can see the latest message as much as possible.

Description

technical field [0001] The invention relates to the field of data synchronization, in particular to a scheme for achieving consistency between cache and DB data in an asynchronous manner. Background technique [0002] The business background is that after the user places an order successfully, it is difficult to see the latest status of the order in a timely manner. In order to improve the user experience, he communicated and negotiated with the front-end colleagues, and through some interactive design and consistent method of cache and DB data Design to enhance user experience. [0003] image 3 It is a comparison of the advantages and disadvantages of this solution with several other traditional solutions; except for the high complexity required for the first implementation, the advantages brought by other aspects are more obvious. At present, the data related to the application of this solution are as follows: [0004] QPS: Support nearly ten thousand QPS; [0005] Cach...

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): G06F16/2455G06F16/27G06F9/54G06Q30/06
CPCG06F16/24552G06F16/273G06F9/546G06Q30/0635G06F2209/547G06F2209/548
Inventor 郑奕凯曹向丽
Owner TIANYI ELECTRONICS COMMERCE
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