You can implement such a linearizable compare-and-set operation as follows by using total order broadcast as an append-only log [62, 63]: Append a message to the log, tentatively indicating the username you want to claim. Read the log, and wait for the message you appended to be delivered back to you.xi Check for any messages claiming the username that you want. If the first message for your desired username is your own message, then you are successful: you can commit the username claim (perhaps by appending another message to the log) and acknowledge it to the client. If the first message for
...more