[go: up one dir, main page]

CN114006913A - Distributed lock processing method and device - Google Patents

Distributed lock processing method and device Download PDF

Info

Publication number
CN114006913A
CN114006913A CN202111273364.3A CN202111273364A CN114006913A CN 114006913 A CN114006913 A CN 114006913A CN 202111273364 A CN202111273364 A CN 202111273364A CN 114006913 A CN114006913 A CN 114006913A
Authority
CN
China
Prior art keywords
distributed lock
distributed
request
cross
machine room
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111273364.3A
Other languages
Chinese (zh)
Other versions
CN114006913B (en
Inventor
刘楠楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202111273364.3A priority Critical patent/CN114006913B/en
Publication of CN114006913A publication Critical patent/CN114006913A/en
Application granted granted Critical
Publication of CN114006913B publication Critical patent/CN114006913B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multi Processors (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a processing method and a device of a distributed lock, relating to the technical field of distribution, wherein the method comprises the following steps: the method comprises the steps that a recognition unit obtains a distributed lock request of a distributed lock user, when recognizing that the distributed lock request is the distributed lock request of the same machine room, the distributed lock request of the same machine room is sent to a local agent, and when recognizing that the distributed lock request is the distributed lock request of other machine rooms, the distributed lock request of other machine rooms is sent to a cross-center agent; the local proxy calls an interface of the distributed lock corresponding to the local resource, so that a user obtains the distributed lock of the local resource; and the cross-center agent sends the distributed lock requests of other machine rooms to the cross-center agents of other machine rooms, and the cross-center agents of other machine rooms call interfaces of the distributed locks corresponding to other machine room resources, so that a user obtains the distributed locks of other machine room resources. The invention can realize the processing of the distributed lock with high performance.

Description

Distributed lock processing method and device
Technical Field
The present invention relates to the field of distributed technologies, and in particular, to a method and an apparatus for processing a distributed lock.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
At present, in a distributed scenario of multiple remote centers, one transaction of one center may involve access to multiple different resources of other machine rooms, and at the same time, consistency of transactions is required, and such transactions are not easy to process in a split manner, which may cause that resources of one machine room may be locked by multiple other machine rooms to achieve linear access, and thus, a management mechanism of locking resources across machine rooms is involved. The problem faced in this kind of scenario at present is that there is no effective and reasonable solution for adding distributed locks to resources across the center, and users of the locks need to connect multiple rooms, which leads to too many connections to be difficult to manage, and thus leads to a complex architecture. The same room can be solved by distributed locking tools (such as REDIS), but it is difficult to solve across rooms. The distributed locks added to the local room resources do not have a unified scheme for adapting to multiple distributed lock technologies, and users need to use a distributed lock native interface and cannot adapt uniformly. Therefore, the existing scheme for distributed lock handling has low performance.
Disclosure of Invention
The embodiment of the invention provides a processing method of a distributed lock, which is used for realizing the processing of the distributed lock with high performance, and comprises the following steps:
the method comprises the steps that a recognition unit obtains a distributed lock request of a distributed lock user, when recognizing that the distributed lock request is the distributed lock request of the same machine room, the distributed lock request of the same machine room is sent to a local agent, and when recognizing that the distributed lock request is the distributed lock request of other machine rooms, the distributed lock request of other machine rooms is sent to a cross-center agent;
after the local proxy acquires the distributed lock request of the same machine room, a user acquires the distributed lock of the local resource by calling an interface of the distributed lock corresponding to the local resource;
after the cross-center agent acquires the distributed lock requests of other machine rooms, the distributed lock requests of other machine rooms are sent to the cross-center agent of other machine rooms, and the cross-center agent of other machine rooms calls the interfaces of the distributed locks corresponding to other machine room resources, so that a user can obtain the distributed locks of other machine room resources.
An embodiment of the present invention further provides a processing apparatus for a distributed lock, so as to implement processing of a high-performance distributed lock, where the apparatus includes:
the identification unit is used for acquiring a distributed lock request of a distributed lock user, sending the distributed lock request of the same machine room to the local agent when identifying that the distributed lock request is the distributed lock request of the same machine room, and sending the distributed lock request of other machine rooms to the cross-center agent when identifying that the distributed lock request is the distributed lock request of other machine rooms;
the local proxy is used for calling an interface of the distributed lock corresponding to the local resource after acquiring the distributed lock request of the same machine room, so that a user can acquire the distributed lock of the local resource;
and the cross-center agent is used for sending the distributed lock requests of other machine rooms to the cross-center agents of other machine rooms after acquiring the distributed lock requests of other machine rooms, and calling the interfaces of the distributed locks corresponding to other machine room resources through the cross-center agents of other machine rooms, so that a user obtains the distributed locks of other machine room resources.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the processing method of the distributed lock.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the processing method of the distributed lock is stored in the computer-readable storage medium.
In the embodiment of the invention, the processing scheme of the distributed lock comprises the following steps: the method comprises the steps that a recognition unit obtains a distributed lock request of a distributed lock user, when recognizing that the distributed lock request is the distributed lock request of the same machine room, the distributed lock request of the same machine room is sent to a local agent, and when recognizing that the distributed lock request is the distributed lock request of other machine rooms, the distributed lock request of other machine rooms is sent to a cross-center agent; after the local proxy acquires the distributed lock request of the same machine room, a user acquires the distributed lock of the local resource by calling an interface of the distributed lock corresponding to the local resource; after the cross-center agent acquires the distributed lock requests of other machine rooms, the distributed lock requests of other machine rooms are sent to the cross-center agent of other machine rooms, and the cross-center agent of other machine rooms calls interfaces of distributed locks corresponding to other machine room resources, so that a user obtains the distributed locks of other machine room resources, and high-performance distributed lock processing can be achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
FIG. 1 is a flowchart illustrating a method for processing a distributed lock according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for processing a distributed lock according to another embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating operation of the recognition unit according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a processing apparatus of a distributed lock according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a processing apparatus of a distributed lock according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Before describing the embodiments of the present invention, first, terms related to the present invention will be described.
1. Distributed: the computer system is characterized in that a plurality of computers with different sites, different functions and different data are connected through network communication, and large-scale information processing tasks are coordinately completed under the unified management of a control system.
2. Distributed lock: distributed locks are one way to control the synchronous access to shared resources between distributed systems.
3, REDIS: REDIS is a NoSQL database that stores data in the form of key-value pairs, based on memory.
4, DB: database, relational database.
5, ZK: zookeeper, a distributed coordination service, provides coordination services for distributed applications of users and also can implement the functions of distributed locks.
6. Distributed lock users: programs, applications, services, etc. that acquire resource locks in a distributed fashion are needed.
At present, all solutions for using distributed locks on resources are concentric, and no cross-center solution for using distributed locks on resources exists. Meanwhile, at present, there is no unified solution for a processing layer of a distributed lock, and a distributed lock user needs to use a specific interface of the distributed lock.
The embodiment of the invention provides a processing scheme for solving the problem of cross-center distributed locks by using an agent layer, manages the distributed locks under multiple machine rooms, and has simple structure and convenient use. The embodiment of the invention provides a scheme for using a local proxy, provides a uniform interface for a user, and is suitable for being realized by various distributed lock technologies. Specifically, the method comprises the following steps:
1) distributed lock brokering using multiple hubs
The embodiment of the invention designs a simple and efficient solution for managing the distributed lock by using the distributed lock agent under the cross-center resource sharing scene in the remote multi-center architecture. When each machine room acquires the distributed locks, the local distributed locks are managed uniformly in an agent mode, the agent layer provides a uniform operation interface for a user, and the user can conveniently and efficiently acquire the local machine room resource distributed locks or other machine room resource distributed locks in different places.
2) Concentric use distributed lock broker
When the distributed lock is needed to be used by the concentric computer room in the center, the distributed lock is managed by the local distributed lock agent, the agent layer provides a uniform operation interface for a user, and meanwhile, the agent layer acts on the technical implementation layer of the bottom distributed lock and can be adapted to various distributed locks.
3) Cross-center use of distributed lock proxies
When distributed locks are needed to be used in different machine rooms across the center, the distributed locks are managed by the distributed locks across the center in an agent mode, the agent layer provides a uniform operation interface for users, and meanwhile, the agent layer is connected with other machine room agent layers, so that management of the distributed locks across the machine rooms is achieved.
4) Implementing P2P network between agents
The P2P network is realized among the agent layers across the center, the agent layers communicate in a direct connection mode, the operations of obtaining and releasing the distributed locks across the center are realized, and meanwhile, the direct connection among the agent layers can more efficiently process the distributed locks across the machine room.
5) Queue buffer designed by local agent mechanism in agent
By home agent is meant a distributed lock for other rooms on the home agent's behalf. The queue cache is designed for the agent to cache the distributed locks of other machine rooms, the order of acquiring the locks can be ensured firstly through the order cache mechanism, and the distributed lock requests of different machine rooms can be managed conveniently through the mode of caching in advance, so that the pressure of the agent layer of the local machine room can be reduced.
6) Integrity management of all locks in a proxy's mechanism transaction in a proxy
Home agent means a home agent that proxies the local application to acquire the distributed lock. The local proxy agent provides a uniform request interface for the request of the distributed lock of the local resource to the user, so that the application does not need to care about the details of obtaining the lock and the specific technical implementation details of the distributed lock. The agent provides management of all locks, providing a fully functional, simple to use distributed lock function.
The processing scheme of the distributed lock is described in detail below.
Fig. 1 is a schematic flowchart of a processing method of a distributed lock in an embodiment of the present invention, and as shown in fig. 1, the method includes the following steps:
step 101: the method comprises the steps that a recognition unit obtains a distributed lock request of a distributed lock user, when recognizing that the distributed lock request is the distributed lock request of the same machine room, the distributed lock request of the same machine room is sent to a local agent, and when recognizing that the distributed lock request is the distributed lock request of other machine rooms, the distributed lock request of other machine rooms is sent to a cross-center agent;
step 102: after the local proxy acquires the distributed lock request of the same machine room, a user acquires the distributed lock of the local resource by calling an interface of the distributed lock corresponding to the local resource;
step 103: after the cross-center agent acquires the distributed lock requests of other machine rooms, the distributed lock requests of other machine rooms are sent to the cross-center agent of other machine rooms, and the cross-center agent of other machine rooms calls the interfaces of the distributed locks corresponding to other machine room resources, so that a user can obtain the distributed locks of other machine room resources.
The processing scheme of the distributed lock provided by the embodiment of the invention can realize the processing of the distributed lock with high performance. The individual steps involved in the method are described in detail below.
First, the above step 101 is described.
As shown in fig. 3, this step 101 includes: step 1011: acquiring a distributed lock request of a distributed lock user; step 1012: when the distributed lock request is identified to be the distributed lock request of the same machine room, the distributed lock request of the same machine room is sent to a local agent; step 1013: and when the distributed lock request is identified to be the distributed lock request of other machine rooms, sending the distributed lock request of other machine rooms to the cross-center agent.
In specific implementation, the identification unit acquires a request of a distributed lock user for applying for a distributed lock or releasing the distributed lock, and then distinguishes whether the request is the distributed lock of the same machine room or the distributed locks of other machine rooms to transfer the request to a local machine room agent or other machine room agents.
In one embodiment, the distributed lock consumer may include a program, application, or service that needs to acquire the distributed lock.
As noted above, in one embodiment, the distributed lock request may include a request to apply for a distributed lock or to release a distributed lock.
Next, step 102 is described.
In one embodiment, as shown in FIG. 5, the distributed locks may include REDIS distributed locks, DB distributed locks, or ZK distributed locks.
In specific implementation, after acquiring a request for applying for a distributed lock or releasing the distributed lock, the local agent forwards the request to a realization layer of the distributed lock, that is, a REDIS distributed lock, a DB distributed lock, a ZK distributed lock, or the like.
Third, next, step 103 is introduced.
After the cross-center agent obtains a request for applying the distributed lock or releasing the distributed lock, the request is transferred to a distributed lock agent layer (which may be a cross-center agent) of a corresponding machine room, and meanwhile, agent layers (which may include an identification unit, a local agent and the cross-center agent) of different machine rooms are communicated with each other to achieve information synchronization.
Fourthly, next, further preferred steps are introduced.
In one embodiment, as shown in fig. 2, the processing method of the distributed lock may further include step 104: the queue cache stores distributed lock requests of other computer rooms.
To facilitate an understanding of how the present invention may be implemented, a general description of the architecture provided by embodiments of the present invention is provided below with reference to fig. 5.
As shown in FIG. 5, the distributed lock agent layer may include a home agent, a cross-center agent, and a queue cache.
1) Solution for distributed lock across machine rooms
Through the design mode of the distributed lock agent layer, a user can apply and release the distributed locks of the local center and other centers through the agent layer, and the cross-center distributed lock scene can be processed efficiently and simply.
2) Distributed lock user
Programs, applications, services, etc. that acquire resource locks in a distributed fashion are needed.
3) Home agent
Providing interfaces of the distributed locks corresponding to the uniform local resources for a user, and obtaining the distributed locks of the local resources by the user through the interfaces; the local agent is realized by a plurality of distributed lock technologies, namely the local agent is responsible for proxying the distributed lock of the local resource and adapting to a plurality of realization modes, such as REDIS distributed lock, DB distributed lock, ZK distributed lock and the like.
4) Cross-center agent
The cross-center agents are responsible for acquiring resource distributed locks of other centers and provide a uniform cross-center distributed lock acquisition mode for users, the agents communicate with each other and manage the connection between the centers, namely, interfaces of the uniform cross-center resource corresponding distributed locks are provided for users, and the users use the interfaces to acquire the distributed locks of the resources of other centers; and the cross-center agent is in butt joint with other centers, and the processing of the distributed locks of a plurality of resources related to a plurality of centers is realized by directly connecting the cross-center agents of the other centers.
5) Queue caching
The cross-hub agent uses a queue cache that stores requests for distributed locks.
6) Connection between centres
The connection between the centers (machine rooms) is uniformly managed through a distributed lock agent layer, so that the establishment and the destruction of the connection are realized, and the life cycle of the connection is managed. The user does not need to be concerned with the connection between the centres.
To sum up, the embodiment of the invention comprises a local agent, a cross-center agent and a queue cache, wherein the local agent is a module for completing the acquisition of the distributed lock of the local resource; the cross-center agent is a module for completing the acquisition of distributed locks of other center resources; the queue cache caches distributed lock requests, wherein:
the local agent provides an interface of the local resource corresponding to the distributed lock, and is adaptive to various distributed lock technologies.
The cross-center agents provide interfaces for uniformly crossing the distributed locks corresponding to the center resources, the cross-center agents are interconnected and manage the connection between the centers, and the cross-center agents are connected with the queue cache.
Queue caches are connected across the central agents, storing requests for distributed locks.
In summary, the processing method of the distributed lock provided by the embodiment of the present invention has the following advantages:
1. the function of uniformly processing the distributed locks is provided by the local proxy layer, and the distributed locks can be realized by adapting to various distributed lock technologies.
2. The solution of acquiring the distributed lock under multiple centers is provided by the cross-center agent, so that the framework is simpler, and the use by a user is more convenient.
3. The method for caching the distributed lock requests is provided through the queue cache, and the application sequence can be guaranteed.
4. The present invention provides an efficient solution for handling of distributed locks under multiple hubs.
The embodiment of the invention also provides a processing device of the distributed lock, and the processing device is described in the following embodiments. Because the principle of the device for solving the problem is similar to the processing method of the distributed lock, the implementation of the device can refer to the implementation of the processing method of the distributed lock, and repeated details are not repeated.
Fig. 4 is a schematic structural diagram of a processing apparatus for a distributed lock in an embodiment of the present invention, as shown in fig. 4, the apparatus includes:
the identification unit 01 is used for acquiring a distributed lock request of a distributed lock user, sending the distributed lock request of the same machine room to a local agent when identifying that the distributed lock request is the distributed lock request of the same machine room, and sending the distributed lock request of other machine rooms to a cross-center agent when identifying that the distributed lock request is the distributed lock request of other machine rooms;
the local proxy 02 is used for calling an interface of a distributed lock corresponding to a local resource after acquiring the distributed lock request of the same machine room, so that a user acquires the distributed lock of the local resource;
the cross-center agent 03 is configured to send the distributed lock requests of other machine rooms to cross-center agents of other machine rooms after acquiring the distributed lock requests of other machine rooms, and call interfaces of distributed locks corresponding to other machine room resources through the cross-center agents of other machine rooms, so that a user obtains the distributed locks of other machine room resources.
In one embodiment, the distributed lock comprises a REDIS distributed lock, a DB distributed lock, or a ZK distributed lock.
In an embodiment, as shown in fig. 5, the processing apparatus of the distributed lock may further include: and the queue cache is used for storing distributed lock requests of other machine rooms.
In one embodiment, the distributed lock consumer includes a program, application, or service that needs to acquire the distributed lock.
In one embodiment, the distributed lock request comprises a request to apply for a distributed lock or release a distributed lock.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the processing method of the distributed lock.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the processing method of the distributed lock is stored in the computer-readable storage medium.
In the embodiment of the invention, the processing scheme of the distributed lock comprises the following steps: the method comprises the steps that a recognition unit obtains a distributed lock request of a distributed lock user, when recognizing that the distributed lock request is the distributed lock request of the same machine room, the distributed lock request of the same machine room is sent to a local agent, and when recognizing that the distributed lock request is the distributed lock request of other machine rooms, the distributed lock request of other machine rooms is sent to a cross-center agent; after the local proxy acquires the distributed lock request of the same machine room, a user acquires the distributed lock of the local resource by calling an interface of the distributed lock corresponding to the local resource; after the cross-center agent acquires the distributed lock requests of other machine rooms, the distributed lock requests of other machine rooms are sent to the cross-center agent of other machine rooms, and the cross-center agent of other machine rooms calls interfaces of distributed locks corresponding to other machine room resources, so that a user obtains the distributed locks of other machine room resources, and high-performance distributed lock processing can be achieved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (12)

1. A method for processing a distributed lock, comprising:
the method comprises the steps that a recognition unit obtains a distributed lock request of a distributed lock user, when recognizing that the distributed lock request is the distributed lock request of the same machine room, the distributed lock request of the same machine room is sent to a local agent, and when recognizing that the distributed lock request is the distributed lock request of other machine rooms, the distributed lock request of other machine rooms is sent to a cross-center agent;
after the local proxy acquires the distributed lock request of the same machine room, a user acquires the distributed lock of the local resource by calling an interface of the distributed lock corresponding to the local resource;
after the cross-center agent acquires the distributed lock requests of other machine rooms, the distributed lock requests of other machine rooms are sent to the cross-center agent of other machine rooms, and the cross-center agent of other machine rooms calls the interfaces of the distributed locks corresponding to other machine room resources, so that a user can obtain the distributed locks of other machine room resources.
2. The method of processing a distributed lock as recited in claim 1, wherein the distributed lock comprises a REDIS distributed lock, a DB distributed lock, or a ZK distributed lock.
3. The method of processing a distributed lock as recited in claim 1, further comprising: the queue cache stores distributed lock requests of other computer rooms.
4. The method of processing a distributed lock as recited in claim 1, wherein the distributed lock consumer comprises a program, application, or service that needs to acquire the distributed lock.
5. The method of distributed lock processing as claimed in claim 1, wherein the distributed lock request comprises a request to apply for a distributed lock or to release a distributed lock.
6. A distributed lock handling apparatus, comprising:
the identification unit is used for acquiring a distributed lock request of a distributed lock user, sending the distributed lock request of the same machine room to the local agent when identifying that the distributed lock request is the distributed lock request of the same machine room, and sending the distributed lock request of other machine rooms to the cross-center agent when identifying that the distributed lock request is the distributed lock request of other machine rooms;
the local proxy is used for calling an interface of the distributed lock corresponding to the local resource after acquiring the distributed lock request of the same machine room, so that a user can acquire the distributed lock of the local resource;
and the cross-center agent is used for sending the distributed lock requests of other machine rooms to the cross-center agents of other machine rooms after acquiring the distributed lock requests of other machine rooms, and calling the interfaces of the distributed locks corresponding to other machine room resources through the cross-center agents of other machine rooms, so that a user obtains the distributed locks of other machine room resources.
7. The apparatus for processing the distributed lock as recited in claim 6, wherein the distributed lock comprises a REDIS distributed lock, a DB distributed lock, or a ZK distributed lock.
8. The distributed lock processing apparatus of claim 6, further comprising: and the queue cache is used for storing distributed lock requests of other machine rooms.
9. The apparatus for processing the distributed lock as recited in claim 6, wherein the distributed lock consumer comprises a program, application or service that needs to acquire the distributed lock.
10. The apparatus for processing the distributed lock as recited in claim 6, wherein the distributed lock request comprises a request to apply for a distributed lock or release a distributed lock.
11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 5 when executing the computer program.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 5.
CN202111273364.3A 2021-10-29 2021-10-29 Processing method and device of distributed lock Active CN114006913B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111273364.3A CN114006913B (en) 2021-10-29 2021-10-29 Processing method and device of distributed lock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111273364.3A CN114006913B (en) 2021-10-29 2021-10-29 Processing method and device of distributed lock

Publications (2)

Publication Number Publication Date
CN114006913A true CN114006913A (en) 2022-02-01
CN114006913B CN114006913B (en) 2024-10-11

Family

ID=79925197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111273364.3A Active CN114006913B (en) 2021-10-29 2021-10-29 Processing method and device of distributed lock

Country Status (1)

Country Link
CN (1) CN114006913B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013000135A1 (en) * 2011-06-29 2013-01-03 中兴通讯股份有限公司 Locking method and system for distributed messages
US20150350318A1 (en) * 2014-05-29 2015-12-03 Fusion-Io, Inc. Synchronizing storage state information
CN106775974A (en) * 2016-12-07 2017-05-31 国云科技股份有限公司 A Realization Method of Distributed Priority Queue Lock
CN107181789A (en) * 2017-03-31 2017-09-19 北京奇艺世纪科技有限公司 A kind of distributed lock implementation method and device
CN107347084A (en) * 2016-05-05 2017-11-14 华为技术有限公司 The method, apparatus and system of distributed lock management
CN109743366A (en) * 2018-12-21 2019-05-10 苏宁易购集团股份有限公司 A kind of resource locking method, apparatus and system for scene of more living
CN111124697A (en) * 2020-01-02 2020-05-08 中国航空工业集团公司西安航空计算技术研究所 Task synchronization and execution method facing distributed platform

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013000135A1 (en) * 2011-06-29 2013-01-03 中兴通讯股份有限公司 Locking method and system for distributed messages
US20150350318A1 (en) * 2014-05-29 2015-12-03 Fusion-Io, Inc. Synchronizing storage state information
CN107347084A (en) * 2016-05-05 2017-11-14 华为技术有限公司 The method, apparatus and system of distributed lock management
CN106775974A (en) * 2016-12-07 2017-05-31 国云科技股份有限公司 A Realization Method of Distributed Priority Queue Lock
CN107181789A (en) * 2017-03-31 2017-09-19 北京奇艺世纪科技有限公司 A kind of distributed lock implementation method and device
CN109743366A (en) * 2018-12-21 2019-05-10 苏宁易购集团股份有限公司 A kind of resource locking method, apparatus and system for scene of more living
CN111124697A (en) * 2020-01-02 2020-05-08 中国航空工业集团公司西安航空计算技术研究所 Task synchronization and execution method facing distributed platform

Also Published As

Publication number Publication date
CN114006913B (en) 2024-10-11

Similar Documents

Publication Publication Date Title
US9176772B2 (en) Suspending and resuming of sessions
US10133596B2 (en) System and method for supporting application interoperation in a transactional middleware environment
US9262218B2 (en) Methods and apparatus for resource management in cluster computing
KR101863398B1 (en) Method and system for synchronization mechanism on multi-server reservation system
KR100625595B1 (en) Parallel Logging Method and Transaction Log Processing System of Transaction Processing System
US8996469B2 (en) Methods and apparatus for job state tracking in cluster computing
US9804889B2 (en) Methods and apparatus for state objects in cluster computing
CN101262498B (en) A distributed message call method and device
CN105765578B (en) Parallel access of data in a distributed file system
US20060112398A1 (en) System and Methodology Providing Service Invocation for Occasionally Connected Computing Devices
CN113032166B (en) Inter-core communication method, processor, inter-core communication system, and computer-readable storage medium
JPH10149296A (en) Method and apparatus for identifying server-computer aggregated topology
JP7725135B2 (en) Computer-implemented method, computer system, and computer program product (Fault management in edge computing environments)
CN111147571B (en) Distributed task scheduling method, device, system, storage medium and electronic equipment
CN106357791A (en) Method, device and system for processing services
US6138169A (en) System and method for creating an object oriented transaction service that achieves interoperability with encina procedural transactions
CN112416980B (en) Data service processing method, device and equipment
CN111190731A (en) Cluster task scheduling system based on weight
CN115114022A (en) Method, system, device and medium for using GPU resources
JP4976128B2 (en) Transparent session transport between servers
CN112202605A (en) Service configuration method, device, equipment and storage medium
CN114006913A (en) Distributed lock processing method and device
CN115361382A (en) Data processing method, device, equipment and storage medium based on data group
CN102710772A (en) Mass data communication system based on cloud platform
US9092779B2 (en) Heuristics processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant