Extracting To A Greater Extent Than Concurrency From Distributed Transactions

This newspaper appeared inward OSDI'14. The authors are: Shuai Mu, Yang Cui, Yang Zhang, Wyatt Lloyd, Jinyang Li. The paper, presentation slides in addition to video are accessible here.

The newspaper proposes a concurrency command protocol for distributed transactions, in addition to evaluates its surgical physical care for comparing amongst two-phase locking (2PL) in addition to optimistic concurrency command (OCC).

The protocol

The protocol introduced, ROCOCO (ReOrdering COnflicts for COncurrency) is targeted for extracting to a greater extent than concurrency nether heavily contended workload than 2PL in addition to OCC tin handle. In fact, ROCOCO's improvements over OCC in addition to 2PL comes subsequently the peak throughput betoken of fifty-fifty ROCOCO. One of the questions subsequently the OSDI presentation was virtually this. "That share where the organisation is thrashing is non a share yous desire to be. Why would yous non employ admission command to reject extra workload that pushes the organisation yesteryear peak performance?"
ROCOCO assumes that a distributed transaction consists of a laid upward of stored procedures called pieces. Each slice accesses i or to a greater extent than information items stored on a unmarried server using user-defined logic. Thus, each slice tin last executed atomically amongst honour to other concurrent pieces yesteryear employing proper local concurrency control.

ROCOCO achieves prophylactic interleavings without aborting or blocking transactions using 2 primal techniques: 1) deferred in addition to reordered execution using dependency tracking; in addition to 2) offline security checking based on the theory of transaction chopping.

ROCOCO's transaction reordering persuasion is adopted from the ePaxos protocol introduced a couplet years ago. This is a neat idea. The start stage is form of similar a dry out run for the transaction. Dependencies amongst other concurrently executing transactions are learned. In the minute phase, the subject transactions are synchronized. They are forced to await for each other in addition to executed that way.


This approach is basically pipelining the transactions. This is too similar to what the Calvin does amongst its log-based approach. Pipelining helps for throughput of course, exactly it too introduces a drawback.

Unlike 2PL in addition to OCC which executes a depended-upon transaction to completion earlier allowing its dependent/conflicting transactions to execute, ROCOCO is deciding on an social club in addition to pipelining the execution of these conflicting transactions inward around determined order. However, if the start transaction of these pipeline-executed transactions does non consummate for around ground or due to a mistake in addition to needs to last rolled back, this too requires rolling-back the remaining transactions inward the pipeline that depended on this transaction. This is a employment 2PL in addition to OCC did non have.

This basic reordering protocol is when around of the transaction pieces/fragments are deferrable. For transaction fragments that are immediate (whose outputs are inputs to other pieces inward a transaction), the reordering protocol is inapplicable, in addition to the newspaper uses an offline checker to avoid conflicts inward such situations.  The Offline checker plant inward next steps:
1. It constructs an S-C graph based on transaction chopping. Each border inward the graph is either a Sibling border (an border formed for pieces of same transaction instance) or a Conflict border (an border formed yesteryear pieces which access the same database tabular array in addition to whatsoever i of the slice issues a write).
2. Each vertex inward the graph is either tagged every bit immediate (I) or deferrable (D). A conflict border  can last an I-I border or a D-D edge.
3. The checker observes all the S-C cycles formed yesteryear the graph. SC-cycles stand upward for potential non-serializable interleavings. However, if an SC-cycle contains at to the lowest degree i D-D edge, ROCOCO tin reorder the execution of the D-D edge's pieces to intermission the wheel in addition to ensure serializability. For an unreorderable SC-cycle amongst all I-I C-edges, the checker proposes to merge those pieces inward the wheel belonging to the same transaction into a larger atomic piece. ROCOCO relies on traditional distributed concurrency command methods such every bit 2PL or OCC to execute merged pieces.

Evaluation

ROCOCO is  implemented every bit an in-memory key-value store amongst 20K C++ code  and evaluated using a scaled TPC-C benchmark inward comparing to OCC in addition to 2PL. Given that Calvin  is a closely related function (because it too orders transactions in addition to pipelines their execution), it would last practiced to encounter a comparing to Calvin, exactly the newspaper does non include that.

Some miscellaneous thoughts

In the introduction, the next paragraph is provided every bit a motivation for ROCOCO.
Unfortunately, tilt is non rare inward large-scale OLTP applications. For example, catch a transaction where a client purchases a few items from a shopping website. Concurrent purchases yesteryear dissimilar customers on the same special do conflicts. Moreover, every bit the organisation scales—i.e., the site becomes to a greater extent than pop in addition to has to a greater extent than customers, exactly maintains a relatively stable laid upward of items—concurrent purchases to the same special are to a greater extent than probable to happen, leading to a greater tilt rate.
CRDT1, CRDT2, CRDT3) The coordination avoidance inward distributed databases paper too argues for  avoiding coordination when all local commit decisions are globally valid (in other words, when the commit decisions are composable).

0 Response to "Extracting To A Greater Extent Than Concurrency From Distributed Transactions"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel