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

High concurrent redis database operation method and system

An operation method and operating system technology, applied in the field of high concurrent REDIS database operation methods and systems, can solve problems such as low efficiency and time-consuming, and achieve the effects of improving processing efficiency, improving reliability, and reducing average time-consuming.

Active Publication Date: 2019-10-01
BEIJING VRV SOFTWARE CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] When using the Redis database in software development, it is necessary to use the commands of adding, modifying, and deleting to operate the Redis database; there are two available operation modes: non-pipeline and pipeline operations; among them, non-pipeline operations need to wait after the command is executed The returned results, such as: set, hset, get, hget, del and other commands, need to be operated one by one when dealing with high concurrency, and the efficiency is very low; therefore, it is necessary to use pipelines to operate the Redis database. The advantage of this is the processing efficiency at high concurrency Improvement, its disadvantage is that it needs to wait for all the operations in the entire pipeline to complete before finally returning all the results; finally, it needs to match all the results one by one to the incoming operations of the pipeline operation, which takes a certain amount of time

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
  • High concurrent redis database operation method and system
  • High concurrent redis database operation method and system
  • High concurrent redis database operation method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are the Some, but not all, embodiments are invented. 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.

[0031] see figure 1 and figure 2 , this embodiment discloses a highly concurrent REDIS database operation method, including:

[0032] S1. Build a Pipeline connection pool, a singleton tool class for Redis operations, a task thread and start the thread;

[0033] S2. Build one for each Pipeline

[0034] HashMap> and

[0035] LinkedBlockingQueue, wherei...

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 high-concurrency REDIS database operation method and system. According to the method and system, operation frequency of calling a Redis database by a business method can be decreased, and multiple operations are combined into one Pipeline operation, so that average time consumption of Redis database operation is remarkably decreased, and processing efficiency of a whole business module is improved; through using a Pipeline to execute time consumption statistic of LinkedBlockingQueue<Object[]>, the side of the LinkedBlockingQueue<Object[]>is dynamically controlled, so that average time consumption of each execution of the Pipeline can achieve an optimum state, overtime failure caused by too long waiting time of operation result returning due to instant high-concurrency operation is avoided, and then the reliability of Redis databases is improved.

Description

technical field [0001] The invention relates to the field of Redis databases, in particular to a highly concurrent REDIS database operating method and system. Background technique [0002] When using the Redis database in software development, it is necessary to use the commands of adding, modifying, and deleting to operate the Redis database; there are two available operation modes: non-pipeline and pipeline operations; among them, non-pipeline operations need to wait after the command is executed The returned results, such as: set, hset, get, hget, del and other commands, need to be operated one by one when dealing with high concurrency, and the efficiency is very low; therefore, it is necessary to use pipelines to operate the Redis database. The advantage of this is the processing efficiency at high concurrency Improvement, its disadvantage is that it needs to wait for all the operations in the entire pipeline to complete before finally returning all the results; finally,...

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 Patents(China)
IPC IPC(8): G06F16/25G06F16/2458
Inventor 熊明强党艳平潘仁胜
Owner BEIJING VRV SOFTWARE CO LTD