Slide 12
Slide 12 text
Philipp Haller
Observable Atomic Consistency: Example
• Auction system:
– RDT maintains highest bidder including bid and ID of bidder
– State of RDT = (bid: Int, bidderID: Int)
– Update of (local) state upon submission of new bid:
• submit is commutative:
12
def submit(out s: (Int, Int), bid: Int, bidderID: Int) =
if (bid > s._1)
s := (bid, bidderID)
submit(s, 10, 1); submit(s, 20, 2) -> s == (20, 2)
submit(s, 20, 2); submit(s, 10, 1) -> s == (20, 2)