Comment by lintfordpickle

Comment by lintfordpickle 3 hours ago

4 replies

I found the article interesting, but I don't think I understand what is meant by 'Write Last, Read first' rule - even after reading it a few times. It seems to be too ambiguous a statement to be helpful.

Under the section 'Order of Operations':

> "Since the system of reference doesn’t determine existence, we can safely write to it first without committing anything. [...]"

Then the next paragraph

> "This principle—Write Last, Read First—ensures that we maintain application level consistency."

What I think it means is, 'writing-last to the system-of-record' and 'a read-first from the system of record' yields authoritative results, but I don't get that just from the title. Is my understanding correct?

jorangreef an hour ago

Yes, write last to the system of record, read first from the system of record. Or in other words, commit to the system of record, and then read from the system of record to see what's committed.

(This is similar also to how chain replication preserves consistency.)

withinboredom 2 hours ago

I think they just reinvented 2-phase commit? I'm not sure either tbh.

  • layer8 an hour ago

    No, in two-phase commit all target systems perform two phases (staging the commit, which may fail, and then actually committing it in a failsafe way), which isn’t the case here.

layer8 an hour ago

Not sure why this was downvoted, the comment is completely right.