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

Method and system for client to obtain lock

It is a client-side and request-obtaining technology, which is applied in the network field and can solve problems such as database occupation and avoid long-term locking

Inactive Publication Date: 2016-10-26
NUBIA TECHNOLOGY CO LTD
View PDF4 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The main purpose of the present invention is to propose a method and system for the client to acquire locks, aiming to solve the problem of a large number of databases being occupied by pessimistic locks that lock the database for a long 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
  • Method and system for client to obtain lock
  • Method and system for client to obtain lock
  • Method and system for client to obtain lock

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

[0023] A mobile terminal implementing various embodiments of the present invention will now be described with reference to the accompanying drawings. In the following description, use of suffixes such as 'module', 'part' or 'unit' for denoting elements is only for facilitating description of the present invention and has no specific meaning by itself. Therefore, "module" and "component" may be used mixedly.

[0024] Various embodiments of the present invention operate in a distributed environment, and multiple clients access shared resources on each node through a computer network. In addition, the client of this embodiment is based on the storage system provided by redis (Remote Dictionary Server), and interacts with the server to realize the acquisition of distributed locks. When a client holds a lock and releases ...

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 method and a system for a client to obtain a lock, and belongs to the technical field of networks. The method comprises the steps that: a first client sends a lock obtaining request to a server; the server receives the lock obtaining request and sends a lock obtaining success response to the first client; the first client obtains a lock; a second client sends a lock obtaining request to the server; the server receives the lock obtaining request and sends a lock obtaining failure response to the second client; and the second client fails in obtaining the lock. Therefore, according to the method and the system for the client to obtain the lock, a mutex lock is realized in a distributed environment based on a key-value memory database, so that the problem of resource competition in a concurrent environment is solved, and the problem of exhausted connection caused by long-term locked database is avoided.

Description

technical field [0001] The present invention mainly relates to the field of network technology, in particular to a method and a system for a client to obtain a lock. Background technique [0002] With the development of intelligent terminals, more and more intelligent applications have sprung up, improving people's experience. In daily use, such a scenario often occurs. When using the Vision application, when user A shares a message, user B, user C, and user D see the message at the same time and perform a like operation. However, user A's client does not receive likes or comments from user B, user C, and user D, but only likes or comments from one of the users. This is because in the current view points statistics, the points are displayed in real time. When users like and comment, they can see the increase of their points immediately. However, when multiple users like and comment at the same time, it will cause concurrency problems. When users click frequently at the sam...

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): H04L29/06H04L29/08
CPCH04L67/10H04L67/01
Inventor 刘孟焱
Owner NUBIA TECHNOLOGY 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