Fine-grained Transaction Scheduling in Replicated Databases via Symbolic Execution Pedro Raminhas pedro.raminhas@tecnico.ulisboa.pt Stage: 2 nd Year PhD Student Research Area: Dependable and fault-tolerant systems and networks Advisors: Miguel Matos Paolo Romano
Research Questions • Problem : • Replication techniques incur non-negligible costs to maintain consistency among replicas • 2PC => Distributed Deadlocks • Classic SMR => Serial execution • Parallel SMR => Not to trivial to parallelize txs and maintain consistency
Research Questions • Problem : • Replication techniques incur non-negligible costs to maintain consistency among replicas • 2PC => Distributed Deadlocks • Classic SMR => Serial execution • Parallel SMR => Not to trivial to parallelize txs and maintain consistency Why is it a problem : • Deadlocks • Automatic Conflict Class Prediction => Too • Coarse Grained => Level of the table => Low Throughput • Manual Prediction => Hard and Not optimal Avoid False negatives => Rollback of Txs, • possibly inconsistencies among replicas
Research Questions • Problem : Approach : • • Replication techniques incur non-negligible costs Symbolic Execution => Recurring to Symbolic to maintain consistency among replicas Execution, we are able to provide in a fine-grained • 2PC => Distributed Deadlocks and automatic way the set of objects/tuples • Classic SMR => Serial execution accessed in a transaction. • Parallel SMR => Not to trivial to parallelize txs and maintain consistency Why is it a problem : • Deadlocks • Automatic Conflict Class Prediction => Too • Coarse Grained => Level of the table => Low Throughput • Manual Prediction => Hard and Not optimal Avoid False negatives => Rollback of Txs, • possibly inconsistencies among replicas
Research Questions • Problem : Approach : • • Replication techniques incur non-negligible costs Symbolic Execution => Recurring to Symbolic to maintain consistency among replicas Execution, we are able to provide in a fine-grained • 2PC => Distributed Deadlocks and automatic way the set of objects/tuples • Classic SMR => Serial execution accessed in a transaction. • Parallel SMR => Not to trivial to parallelize txs and maintain consistency Why is it a problem : Consequences: • • Deadlocks Better Parallelism • • Automatic Conflict Class Prediction => Too • No Runtime Overhead => offline analysis • Coarse Grained => Level of the table => Low • No False negatives Throughput Determinist Scheduling algorithms benefit • • Manual Prediction => Hard and Not optimal from fine-grained information Avoid False negatives => Rollback of Txs, • possibly inconsistencies among replicas
Approach Consensus • Most CPUs are multicore!!! • Some Transactions can be run in Parallel C1 C2 C1 C2 • Replicas must remain consistent C1 C2 C3 C4 C3 C4 • Schedule must be deterministic C5 C6 C7 C8
Approach • Compile-Time • SE gives the set of keys/tuples accessed Employee Salary Employee Country Alice X Alice Portugal S c Bob Y Bob Australia a n Jose W Jose USA Pedro Z Pedro Portugal Tx A: Sum of Australia’s Sallary : Entire Table Employee’s Countries && Bob
Approach • Compile-Time • SE gives the set of keys/tuples accessed Employee Salary Employee Country Alice X Alice Portugal S c Bob Y Bob Australia a n Jose W Jose USA Pedro Z Pedro Portugal Tx A: Sum of Australia’s Sallary : Entire Table Employee’s Countries && Bob Tx B: Increase Alice Sallary : Alice
Approach • Compile-Time • SE gives the set of keys/tuples accessed Employee Salary Employee Country Alice X Alice Portugal S c Bob Y Bob Australia a n Jose W Jose USA Pedro Z Pedro Portugal Disjoint!!!!! Tx A: Sum of Australia’s Sallary : Entire Table Employee’s Countries && Bob Tx B: Increase Alice Sallary : Alice
Approach • Runtime • Use fine-grained information to Schedule Transactions Tx A Employee Salary Employee Country Tx B Alice X Alice Portugal S c Bob Y Bob Australia a Tx A n Jose W Jose USA Pedro Z Pedro Portugal Disjoint Lock-Set Run in parallel Tx A: Sum of Australia’s Sallary : Entire Table Employee’s Countries && Bob Tx B: Increase Alice Sallary : Alice
Approach • Runtime • Use fine-grained information to Schedule Transactions Employee Salary Employee Country Alice X Alice Portugal S c Bob Y Bob Australia a n Jose W Jose USA Pedro Z Pedro Portugal Tx A: Sum of Australia’s Sallary : Entire Table Employee’s Countries && Bob Tx B: Increase Alice Sallary : Alice Solver
Approach Lock-based: Solver: + Simple + Provides the optimal schedule for batch + No runtime overhead - Imposes runtime - Not trivial to overhead parallelize lock table
Thanks for the attention Q&A
Recommend
More recommend