Distributed Time-Warping: rules 1/2 Distributed scalar clock protocol — used to version data 1 ts C orders transactions after dependencies ( read-from ) ◮ In the absence of stale reads, T 2 . ts C = scalar clock 2 before transactions that were missed ◮ Otherwise, serialize before earliest transaction missed ◮ earliest missed T 2 : T 1 . ts C = T 2 . ts C − ǫ read x read y write y T 1 ts = 1 - ε T 3 rw ts = 2 write z T 2 ts = 1 read x write x Nuno Diegues 12/27
Distributed Time-Warping: rules 2/2 When can we not apply this idea? Nuno Diegues 13/27
Distributed Time-Warping: rules 2/2 When can we not apply this idea? Look out for a specific structure Nuno Diegues 13/27
Distributed Time-Warping: rules 2/2 When can we not apply this idea? Look out for a specific structure: write y read x Three transactions connected A B ◮ a triad rw rw T read y write x Nuno Diegues 13/27
Distributed Time-Warping: rules 2/2 When can we not apply this idea? Look out for a specific structure: write y read x Three transactions connected A B ◮ a triad The link between all three rw rw ◮ the pivot Pivot T read y write x Nuno Diegues 13/27
Distributed Time-Warping: rules 2/2 When can we not apply this idea? Look out for a specific structure: Three transactions connected write y read x A B ◮ a triad The link between all three rw rw ◮ the pivot Pivot T Abort if: read y write x ◮ Completes a triad ◮ Whose pivot time-warp commits Nuno Diegues 13/27
Distributed Time-Warping: details read-set read access empty Nuno Diegues 14/27
Distributed Time-Warping: details read-set read access stamp: < ts , tid > Register read operation Nuno Diegues 14/27
Distributed Time-Warping: details read-only read-set transaction stamp: < ts , tid > Abort-free read-only transactions Nuno Diegues 14/27
Distributed Time-Warping: details read-set write-set read write stamp: < ts , tid > stamp: < ts , tid > Consider update transaction: Validate writes and reads Nuno Diegues 14/27
Distributed Time-Warping: details T.start = 9 read-set write-set validate writes may time-warp? stamp: <10, T> stamp: <10, T> Validate writes and reads Nuno Diegues 14/27
Distributed Time-Warping: details T.start = 9 read-set write-set validate writes may time-warp? Yes stamp: <10, T> stamp: < 10 , T> Validate writes and reads Nuno Diegues 14/27
Distributed Time-Warping: details T.start = 9 write-set read-set validate reads may time-warp? Yes need time-warp? stamp: <10, T> stamp: <10, T> Validate writes and reads Nuno Diegues 14/27
Distributed Time-Warping: details T.start = 9 write-set read-set 1 1 validate reads may time-warp? Yes 1 need time-warp? No stamp: <10, T> stamp: <10, T> 1 Validate writes and reads Nuno Diegues 14/27
Distributed Time-Warping: details T.start = 9 read-set write-set 1 1 validate reads may time-warp? Yes 1 need time-warp? Yes stamp: <10, T> stamp: <10, T> 1 2 new version missed! Time-warp commit Nuno Diegues 14/27
Distributed Time-Warping: details T .start = 9 read-set write-set 1 1 may time-warp? No 1 need time-warp? Yes stamp: <10, T> stamp: < 11 , Z > 1 2 Abort condition Nuno Diegues 14/27
Contribution: 2 /2 read z write z T 2 rw rw T 1 read z write z Recall hotspot example Nuno Diegues 15/27
Contribution: 2 /2 read z write z T 2 rw ? rw T 1 read z write z Delayed Actions programming abstraction Nuno Diegues 15/27
Contribution: 2 /2 read z write z T 2 rw ? rw T 1 read z write z Delayed Actions programming abstraction Nuno Diegues 15/27
Contribution: 2 /2 function TPC-C-payment(wID, dID, cID, amount): store .startTransaction() ⊲ load warehouse wID ⊲ load district dID ⊲ load customer cID ⊲ decrement customer balance ⊲ increment customer yield ⊲ update customer credit history ⊲ increment warehouse yield ⊲ increment district yield store .commitTransaction() return Nuno Diegues 15/27
Contribution: 2 /2 function TPC-C-payment(wID, dID, cID, amount): store .startTransaction() ⊲ load warehouse wID ⊲ load district dID ⊲ load customer cID ⊲ decrement customer balance ⊲ increment customer yield ⊲ update customer credit history ⊲ increment warehouse yield — contention hotspot ⊲ increment district yield store .commitTransaction() — restart a lot of work return Nuno Diegues 15/27
Contribution: 2 /2 function TPC-C-payment(wID, dID, cID, amount): store .startTransaction() ... ⊲ lots of stuff String key ← wID + "balanceKey" int amount ← store . read (key) ⊲ does not affect transaction amount ← amount + change store . write (key, amount) ⊲ objective is to increment ... store .commitTransaction() return Nuno Diegues 15/27
Delayed Actions: key idea start T 1 write balance try ... ... ok read commit read balance Server ... ... read abort try balance commit read T 2 write start balance Nuno Diegues 16/27
Delayed Actions: key idea start T 1 write balance try ... ... ok read commit read balance Server ... ... read abort try balance commit read T 2 write start balance Nuno Diegues 16/27
Delayed Actions: key idea start T 1 ... try ok read commit delay T 1 Server delay T 2 ... try ok commit read T 2 start Nuno Diegues 16/27
Contribution 2 /2 Delayed Actions: identify operations processed without conflicts Nuno Diegues 17/27
Contribution 2 /2 Delayed Actions: identify operations ◮ outcome does not affect the transaction processed without conflicts Nuno Diegues 17/27
Contribution 2 /2 Delayed Actions: identify operations ◮ outcome does not affect the transaction ◮ require programmer’s knowledge processed without conflicts Nuno Diegues 17/27
Contribution 2 /2 Delayed Actions: identify operations ◮ outcome does not affect the transaction ◮ require programmer’s knowledge processed without conflicts Nuno Diegues 17/27
Contribution 2 /2 Delayed Actions: identify operations ◮ outcome does not affect the transaction ◮ require programmer’s knowledge processed without conflicts ◮ delayed to commit-time Nuno Diegues 17/27
Contribution 2 /2 Delayed Actions: identify operations ◮ outcome does not affect the transaction ◮ require programmer’s knowledge processed without conflicts ◮ delayed to commit-time ◮ use the latest snapshot Nuno Diegues 17/27
Contribution 2 /2 Delayed Actions: identify operations ◮ outcome does not affect the transaction ◮ require programmer’s knowledge processed without conflicts ◮ delayed to commit-time ◮ use the latest snapshot ◮ ensure it cannot be invalidated Nuno Diegues 17/27
Delayed Actions: details In the commit procedure: Nuno Diegues 18/27
Delayed Actions: details In the commit procedure: acquire locks for delayed actions Nuno Diegues 18/27
Delayed Actions: details In the commit procedure: acquire locks for delayed actions keys were defined by programmer Nuno Diegues 18/27
Delayed Actions: details In the commit procedure: acquire locks for delayed actions keys were defined by programmer ◮ over-approximate for dynamic structures Nuno Diegues 18/27
Delayed Actions: details In the commit procedure: acquire locks for delayed actions keys were defined by programmer ◮ over-approximate for dynamic structures if successful, confirm transaction: Nuno Diegues 18/27
Delayed Actions: details In the commit procedure: acquire locks for delayed actions keys were defined by programmer ◮ over-approximate for dynamic structures if successful, confirm transaction: ◮ atomically execute delayed actions Nuno Diegues 18/27
Delayed Actions: details In the commit procedure: acquire locks for delayed actions keys were defined by programmer ◮ over-approximate for dynamic structures if successful, confirm transaction: ◮ atomically execute delayed actions ◮ write-back deferred updates Nuno Diegues 18/27
Delayed Actions: details In the commit procedure: acquire locks for delayed actions keys were defined by programmer ◮ over-approximate for dynamic structures if successful, confirm transaction: ◮ atomically execute delayed actions ◮ write-back deferred updates ◮ atomicity enforced with sequential confirmation thread per machine Nuno Diegues 18/27
In more detail... Algorithms for Bumper Nuno Diegues 19/27
In more detail... Integration with different Distributed Data Platforms Nuno Diegues 19/27
In more detail... Correctness proofs Nuno Diegues 19/27
In more detail... Fault-tolerance Nuno Diegues 19/27
Experimental Evaluation: questions How much can Bumper enhance scalability in conflict-prone scenarios? Nuno Diegues 20/27
Experimental Evaluation: questions How much can Bumper enhance scalability in conflict-prone scenarios? To what extent can it reduce transactions’ abort rate? Nuno Diegues 20/27
Experimental Evaluation: questions How much can Bumper enhance scalability in conflict-prone scenarios? To what extent can it reduce transactions’ abort rate? What overheads does it introduce? Nuno Diegues 20/27
Recommend
More recommend