I follow this great blog. In this blog, the author has drawn a complete picture of all types of isolation and consistency and the relationship between them.
But based on the Google's blog, there is another type of consistency named External Consistency
which is provided by Google's Spanner database. As I understood:
External consistency = Strongly Consistency + Strict Serializable
After some research, the definition of external consistency might be:
For any two transactions, π1 and π2 (even if on opposite sides of the globe): if π2 starts to commit after π1 finishes committing, then the timestamp for π2 is greater than the timestamp for π1.
I still don't see the differences between External consistency
and Strict Serializability
. Please give me an example that it satisfies Strict Serializability
but not External Consistency
.
Thanks
External consistency is a property of transaction-processing systems, where clients dynamically synthesize transactions that contain multiple read and write operations on arbitrary objects.
Linearizability is the strongest form of consistency. This means that all operations are executed in a way as if executed on a single machine, despite the data being distributed across multiple replicas. As a result, every operation returns an up-to-date value.
The central distinction between the two is that serializability is a global property; a property of an entire history of operations/transactions. Linearizability is a local property; a property of a single operation/transaction.
Spanner is a strongly-consistent, distributed, scalable database built by Google engineers to support some of Google's most critical applications. It takes core ideas from the database and distributed systems communities and expands on them in new ways.
Serializability requires that transactions appear to occur sequentially. Serializability does not require any particular ordering on the serial schedule to which the transaction executions be equivalent to.
Strict serializability requires serializability, but also imposes a condition on the order of the serial schedule to which the transaction execution is equivalent to: a transaction that commits before a different transaction starts must appear to happen first. Suppose A commits before B starts--A must appear to take effect before B. With a single node system this comes for free with serializability, and no one really discusses it in this context. In a distributed system it's very hard. See https://cs.brown.edu/~mph/HerlihyW90/p463-herlihy.pdf.
External consistency is a little different. External consistency requires that a transaction that commits before a different transaction commits must appear to happen first. Suppose A commits before B commits--A must appear to take effect first. See here for a definition of external consistency.
The subtle distinction here is that strict serializability imposes no order on concurrent transactions, whereas external consistency imposes a total order on all transactions. External consistency is therefore a stronger condition in the sense that any externally consistent system is also strictly serializable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With