What is the difference between linearizability and serializability?

后端 未结 5 704
别跟我提以往
别跟我提以往 2021-01-29 19:26

What is the difference between linearizability and serializability (in the context of Java)? Can you please explain the difference between these with an example or provide a goo

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-29 19:57

    There's a great explanation by Peter Bailis here:

    • Linearizability versus Serializability

    "In plain English, under linearizability, writes should appear to be instantaneous. Imprecisely, once a write completes, all later reads (where “later” is defined by wall-clock start time) should return the value of that write or the value of a later write. Once a read returns a particular value, all later reads should return that value or the value of a later write."

    "Serializability is a guarantee about transactions, or groups of one or more operations over one or more objects. It guarantees that the execution of a set of transactions (usually containing read and write operations) over multiple items is equivalent to some serial execution (total ordering) of the transactions."

提交回复
热议问题