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

High-concurrency database access method and method applied to multi-server system

An access method and database technology, applied in the field of database data access, can solve problems such as increased workload, and achieve the effects of stable retrieval efficiency, reduced storage and search time consumption, and improved performance.

Inactive Publication Date: 2013-08-14
宁波公众信息产业有限公司
View PDF5 Cites 32 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This method requires developers to master the corresponding NOSQL development method, and it needs to be called through the network, which has a certain performance overhead
In addition, when developers update the database, they have to write a program and refresh the data in NOSQL at the same time, and the workload will also increase.

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-concurrency database access method and method applied to multi-server system
  • High-concurrency database access method and method applied to multi-server system
  • High-concurrency database access method and method applied to multi-server system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0032] Embodiment 1: A method for accessing a high-concurrency database. Triggers are set in the database, and a cache is set outside the database. The cache is provided with a hash table and a doubly linked list, and a cache clearing thread is provided for timing a long time Clean up the data that is not accessed to ensure that there is sufficient memory to store the cached data. When reading the database, read the cache first. When writing the database, write the updated data to the updated data table through a trigger, and write the updated data to the cache. , specifically include the following steps:

[0033] 1) When the main program reads the database, it first obtains the key value of the relevant data, and then reads the cache through the key value. If there is data in the cache, the main program uses the cached data directly. If there is no data in the cache, it reads the database. And use the read data, and write the read data into the cache at the same time, the spe...

Embodiment 2

[0050] Embodiment 2: The method of applying the high-concurrency database access method of Embodiment 1 to a multi-server system, setting up multiple web servers, and setting one of the servers as the core server, when the data of a certain server changes , to notify the core server of the change of the server, and the core server then notifies all other servers of the change, and the data of all servers is changed to new data.

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 database access method. The high-concurrency database access method is characterized in that a trigger is installed in a database; a cache is installed outside the database; when the database is read, the cache is read firstly; and when the database is written, updating data are written into an updating data table and the cache through the trigger. The high-concurrency database access method has the advantages that a caching technology is applied to access and processing procedures of the database, and recently accessed data blocks are stored in the cache generally by the caching technology by the aid of an LRU (least recently used) algorithm; and since core operations of database applications are data access and data processing, if most of the data blocks which are accessed by an application system are already stored in the cache, namely data are hit in the cache, disk I / O (input / output) waiting and bottlenecks applied to data access can be eliminated, and disk data access efficiency and database access efficiency can be optimized maximumly to close to speed of memory access.

Description

technical field [0001] The invention relates to a data access method of a database, in particular to a highly concurrent database access method and a method applied to a multi-server system. Background technique [0002] In the process of website and application development, users need to obtain data in the database, and complete operations such as data modification, update, and new data insertion, that is, the application of the database. The core operation of the database application is the access and processing of the database. However, in the case of high concurrency, direct database access will cause frequent database reads and writes, and database access will become the bottleneck of system resources. [0003] In most cases, the probability of writing is small, the probability of reading is high, and the probability of repeated reading of the same record is high. The current solution to the above defects is to cache the data in the NOSQL database, but when the data i...

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
Inventor 方净
Owner 宁波公众信息产业有限公司
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