Ensuring globally consistent transactions
First Claim
1. A method, comprising:
- identifying a set of transaction events originating from one or more database clients in a distributed computing system;
receiving a first time interval from at least one globally coherent time service, the first time interval determined based on timestamps generated by a plurality of time masters serving as references in the distributed computing system for the database clients, the first time interval including a current true time and representing a difference between an earliest one of the plurality of time masters and a latest one of the plurality of time masters;
determining, using a processor, a causal timestamp based on the first time interval;
associating the causal timestamp with the set of transaction events;
waiting a period of time for a given transaction event, the period of time corresponding to when the first time interval will pass the causal timestamp;
executing the given transaction event; and
publishing a result of the given transaction event after the period of time.
2 Assignments
0 Petitions
Accused Products
Abstract
The present technology proposes techniques for ensuring globally consistent transactions. This technology may allow distributed systems to ensure the causal order of read and write transactions across different partitions of a distributed database. By assigning causally generated timestamps to the transactions based on one or more globally coherent time services, the timestamps can be used to preserve and represent the causal order of the transactions in the distributed system. In this regard, certain transactions may wait for a period of time after choosing a timestamp in order to delay the start of any second transaction that might depend on it. The wait may ensure that the effects of the first transaction are not made visible until its timestamp is guaranteed to be in the past. This may ensure that a consistent snapshot of the distributed database can be determined for any past timestamp.
30 Citations
20 Claims
-
1. A method, comprising:
-
identifying a set of transaction events originating from one or more database clients in a distributed computing system; receiving a first time interval from at least one globally coherent time service, the first time interval determined based on timestamps generated by a plurality of time masters serving as references in the distributed computing system for the database clients, the first time interval including a current true time and representing a difference between an earliest one of the plurality of time masters and a latest one of the plurality of time masters; determining, using a processor, a causal timestamp based on the first time interval; associating the causal timestamp with the set of transaction events; waiting a period of time for a given transaction event, the period of time corresponding to when the first time interval will pass the causal timestamp; executing the given transaction event; and publishing a result of the given transaction event after the period of time. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 19)
-
-
9. A system, comprising:
-
a memory; and a processor coupled to the memory, the processor configured to; identify a set of transaction events originating from one or more database clients in a distributed computing system; receive a first time interval from at least one globally coherent time service, the first time interval determined based on timestamps generated by a plurality of time masters serving as references in the distributed computing system for the database clients, the first time interval including a current true time and representing a difference between an earliest one of the plurality of time masters and a latest one of the plurality of time masters; determine a causal timestamp based on the first time interval; associate the causal timestamp with the set of transaction events; wait a period of time for a given transaction event, the period of time corresponding to when the first time interval will pass the causal timestamp; execute the given transaction event; and publish a result of the given transaction event after the period of time. - View Dependent Claims (10, 11, 12, 13, 14, 20)
-
-
15. A non-transitory computer-readable storage medium comprising instructions that, when executed by a processor, cause the processor to implement a method of ordering transactions, the method, comprising:
-
identifying a set of transaction events originating from one or more database clients in a distributed computing system; receiving a first time interval from at least one globally coherent time service, the first time interval determined based on timestamps generated by a plurality of time masters serving as references in the distributed computing system, the first time interval including a current true time and representing a difference between an earliest one of the plurality of time masters and a latest one of the plurality of time masters; determining, using the processor, a causal timestamp based on the first time interval; associating the causal timestamp with the set of transaction events; waiting a period of time for a given transaction event, the period of time corresponding to when the first time interval will pass the causal timestamp; executing the given transaction event; and publishing a result of the given transaction event after the period of time. - View Dependent Claims (16, 17, 18)
-
Specification