Method and System for Resolving Lock Contention in Multi-Nodes Network
Publication Date: 2010-Sep-09
The IP.com Prior Art Database
A method and system is disclosed for resolving lock contention in multi-nodes network.
Method and System for Resolving Lock Contention in Multi -Nodes Network
Disclosed is a method and system for resolving lock contention in multi-nodes network. In a multi-nodes network, a task may be performed by one or more peer nodes across network; therefore, it is desirable to ensure that only one node is performing the task a given instance. In accordance with the method and system disclosed herein, a network peer lock mechanism is provided for enabling peer nodes to coordinate with each other to make sure that only one node is performing a task at a given time.
For a node to perform a task at a given time, the node is required to acquire a network lock by coordinating with one or more peer nodes to ensure that the node has right to perform the task at the given time. A network lock consists of a local lock and a peer lock. A software program running on a node is successful in acquiring right to perform a task only when it holds both the local lock and the peer Lock. A peer Lock on one node is a representation of a local lock of other node. In order to acquire a right (a network lock) to perform the task, a software program is required to obtain a local lock; however, in case the local lock is hold by a peer node, the software program fails to acquire the network lock to perform the task.
Once the software program acquires the local lock, it sends a message to a peer node requesting for a local lock from the peer node. If a response from the peer node indicates a success, the software program obtains a peer lock and the network lock is acquired. Subsequently, the software program proceeds to perform the task. However, if a response from the peer node indicates a failure, w...