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

Distributed lock implementation method and device

A technology of distributed locks and implementation methods, which is applied in the computer field, can solve problems such as high risk, inability to adapt to high concurrency, and the impact of unlocking failure, and achieve the effects of improving effectiveness, ensuring stability, and reducing concurrency

Pending Publication Date: 2019-07-19
ADVANCED NEW TECH CO LTD
View PDF4 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Some of these technologies may not be able to adapt to high concurrency situations, some may affect business due to unlocking failure or distributed lock timeliness, and some may have high risks by turning row-level locks into table locks

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
  • Distributed lock implementation method and device
  • Distributed lock implementation method and device
  • Distributed lock implementation method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027] The solutions provided in this specification will be described below in conjunction with the accompanying drawings.

[0028] figure 1 It is a schematic diagram of the implementation structure of the embodiment of this specification. In this implementation architecture, services are deployed in a distributed manner on n virtual machines. The n virtual machines may run on the same physical device, or may run on different devices respectively. The service requests of multiple users are randomly assigned to n virtual machines. Such as figure 1 As shown in , each virtual machine is assigned a different number of service requests. For each virtual machine, different virtual machine locks can be set for different locking objects, and each virtual machine lock uniquely corresponds to one locking object. The locked object can be determined according to the preset business requirements in specific business scenarios. It can be a user (a user corresponds to a virtual machine ...

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 embodiment of the invention provides a distributed lock implementation method and device. In the implementation of the distributed lock, on one hand, for service requests of a plurality of users for a first service, a first virtual machine lock is firstly obtained for a locked object, in each virtual machine, the locking object uniquely corresponds to the first virtual machine lock, and the service requests can be filtered through the distributed virtual machine locks; on the other hand, the service requests filtered out by the virtual machines for the virtual machines are further filteredout through a database lock competition mechanism, so that it is guaranteed that the database operation can only be executed on one locked object in a threaded mode at the same time. Therefore, the effectiveness of the distributed lock can be improved.

Description

technical field [0001] One or more embodiments of this specification relate to the field of computer technology, and in particular to a method and an apparatus for locking a database in a distributed system by using a computer. Background technique [0002] A distributed architecture is an architectural approach that distributes operations across multiple processors or distributes storage across multiple memories. Many large servers are implemented with a distributed architecture. Data consistency among distributed systems is an important issue. Usually, data consistency is guaranteed by ensuring that a method can only be executed by one thread at a time. [0003] In order to ensure that a method can only be executed by one thread at the same time, the conventional technology provides a distributed lock method to ensure that the same method is locked by one thread at the same time. Commonly used distributed locks include database-based lock tables, database-based exclusiv...

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): G06F9/455G06F16/23
CPCG06F9/45558G06F16/2343G06F2009/4557
Inventor 杨宇
Owner ADVANCED NEW TECH CO LTD
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