Patent ID: 8589438

Claim:
A system comprising: a plurality of application servers for accessing shared data; and a centralized control unit for centrally controlling a lock applied to the shared data by each of the application servers; wherein each of the application servers comprises: a distributed control unit for controlling a lock applied to the shared data by the application server; and a selection unit for selecting any one of a distributed mode in which a lock is acquired from the distributed control unit or a centralized mode in which a lock is acquired from the centralized control unit; wherein each of the application servers includes an access control unit for prohibiting an update of the shared data in the distributed mode; wherein: if none of the application servers is updating the shared data, the selection unit of each application server changes the mode of the application server to the distributed mode, and if at least one of the application servers intends to update the shared data, the selection unit of each application server changes the mode of the application server to the centralized mode; wherein: if a first application server updates the shared data in the distributed mode, the selection unit changes the mode of the first application server from the distributed mode to a pre-centralized mode, if at least one of the application servers other than the first application server is placed in the pre-centralized mode when the first application server is placed in the distributed mode, the selection unit changes the mode of the first application server from the distributed mode to pre-centralized mode, and if each of the application servers is placed in the pre-centralized mode or the centralized mode when the first application server is placed in the pre-centralized mode, the selection unit changes the mode of the first application server from the pre-centralized mode to the centralized mode; wherein: the selection unit acquires a lock from the centralized control unit in the pre-centralized mode, and the access control unit prohibits an update of the shared data in the pre-centralized mode; and wherein: if each of the application servers is placed in the pre-centralized mode or the centralized mode when the first application server is placed in the pre-centralized mode, the selection unit changes the mode of the first application server from the pre-centralized mode to centralized read mode, the centralized read mode being a type of the centralized mode, if the first application server needs to update the shared data while the first application server is in the centralized read mode, the selection unit changes the mode of the first application server from the centralized read mode to centralized update mode, the centralized update mode being a type of the centralized mode, and if the first application server finishes updating the shared data in the centralized update mode, the selection unit changes the mode of the application server from the centralized update mode to the centralized read mode.