A method for processing transactions in a distributed computing system including multiple processing modules, the method including: storing data items in a data storage system accessible to multiple processes running in the distributed computing system, where the data items are totally ordered according to an ordering rule, and at least some of the processes are running on different processing modules; and processing transactions using a plurality of the multiple processes, where processing a transaction using one of the plurality of the multiple processes includes receiving a set of requests for accessing data items stored in the data storage system, where the requests are in a first order, obtaining locks (113, 115, 117, 119, 434, 436, 438, 440, 442, 444, 646, 648, 650, 652, 654) on the data items sequentially in the first order if each of the locks (113, 115, 117, 119, 434, 436, 438, 440, 442, 444, 646, 648, 650, 652, 654) is obtained within a first time interval, characterized in that processing a transaction using one of the plurality of the multiple processes further includes determining a second order that is consistent with the ordering rule for at least two of the locks if any of the locks (113, 115, 117, 119, 434, 436, 438, 440, 442, 444, 646, 648, 650, 652, 654) is not obtained within the first time interval, and restarting the transaction being processed, including obtaining locks (113, 115, 117, 119, 434, 436, 438, 440, 442, 444, 646, 648, 650, 652, 654) on data items sequentially in the second order. storing data items in a data storage system accessible to multiple processes running in the distributed computing system, where the data items are totally ordered according to an ordering rule, and at least some of the processes are running on different processing modules; and processing transactions using a plurality of the multiple processes, where processing a transaction using one of the plurality of the multiple processes includes receiving a set of requests for accessing data items stored in the data storage system, where the requests are in a first order, obtaining locks (113, 115, 117, 119, 434, 436, 438, 440, 442, 444, 646, 648, 650, 652, 654) on the data items sequentially in the first order if each of the locks (113, 115, 117, 119, 434, 436, 438, 440, 442, 444, 646, 648, 650, 652, 654) is obtained within a first time interval, processing a transaction using one of the plurality of the multiple processes includes receiving a set of requests for accessing data items stored in the data storage system, where the requests are in a first order, obtaining locks (113, 115, 117, 119, 434, 436, 438, 440, 442, 444, 646, 648, 650, 652, 654) on the data items sequentially in the first order if each of the locks (113, 115, 117, 119, 434, 436, 438, 440, 442, 444, 646, 648, 650, 652, 654) is obtained within a first time interval, characterized in that processing a transaction using one of the plurality of the multiple processes further includes determining a second order that is consistent with the ordering rule for at least two of the locks if any of the locks (113, 115, 117, 119, 434, 436, 438, 440, 442, 444, 646, 648, 650, 652, 654) is not obtained within the first time interval, and restarting the transaction being processed, including obtaining locks (113, 115, 117, 119, 434, 436, 438, 440, 442, 444, 646, 648, 650, 652, 654) on data items sequentially in the second order. determining a second order that is consistent with the ordering rule for at least two of the locks if any of the locks (113, 115, 117, 119, 434, 436, 438, 440, 442, 444, 646, 648, 650, 652, 654) is not obtained within the first time interval, and restarting the transaction being processed, including obtaining locks (113, 115, 117, 119, 434, 436, 438, 440, 442, 444, 646, 648, 650, 652, 654) on data items sequentially in the second order.