Method and device for implementing distributed lock based on a network, and medium

A technology of distributed locks and implementation methods, applied in the computer field, can solve problems such as the failure of concurrency control strategies in single systems, and achieve the effect of solving reentrant problems and effective access

Inactive Publication Date: 2019-05-14
北京明朝万达科技股份有限公司
View PDF3 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, with the needs of business development, after the original single application evolved into a distributed system, the original multi-thr

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 and device for implementing distributed lock based on a network, and medium
  • Method and device for implementing distributed lock based on a network, and medium
  • Method and device for implementing distributed lock based on a network, and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0040] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. 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.

[0041] The core of the present invention is to provide a method, device and readable storage medium for acquiring distributed locks, which solves the problem of distributed lock reentrancy, the problem of single point of failure of distributed lock service and the impact of distributed lock service on third-party software. rely.

[0042] In order to enable those skilled in the art to better understand the solutions of the present invention, the...

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 provides a method and a device for implementing a distributed lock based on a network, and a medium. The method comprises the following steps: firstly, receiving a locking operation request of a distributed lock sent by at least one client, adding at least one client into a client queue for sequencing, sequencing on the basis of time or priority, then obtaining a current client whichfirstly performs a locking operation request, and judging whether the locking request of the current client is a synchronous locking request or an asynchronous locking request; different locking strategies are used according to different locking requests, so that the locking request corresponding to the current client side meeting the conditions obtains the distributed lock and accesses the resource information, and if the conditions are not met, locking failure information is returned. According to the content of the invention, effective access of shared resources is realized, and the problem of reentrancy of the distributed lock, the problem of single-point failure of the distributed lock service and dependence of the distributed lock service on third-party software are solved.

Description

technical field [0001] The present application relates to the field of computer technology, specifically to the field of Internet technology, and in particular to a method, device and medium for implementing a network-based distributed lock. Background technique [0002] At present, almost all large-scale websites and application deployments are distributed. Data consistency in distributed scenarios is an important topic. The distributed CAP theory tells us that "any distributed system cannot satisfy Consistency, Availability, and Partition Tolerance at the same time, and can only satisfy two at the same time.". Therefore, at the beginning of many system designs, trade-offs have been made for these three items. In most Internet systems, it is necessary to sacrifice strong consistency in exchange for high availability of the zone, and the system often only needs to ensure final consistency. [0003] The prior art solutions include three implementations of distributed locks...

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
IPC IPC(8): G06F9/52G06F9/54H04L29/06
Inventor 丁波喻波王志海刘旺韩振国安鹏
Owner 北京明朝万达科技股份有限公司
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