← Back to context

Comment by rakoo

2 days ago

I don't understand this article and It's like the author doesn't really know what they're talking about. They don't want eventual consistency, they want read-your-writes, a consistency level that's stronger than EC yet still not strong.

https://jepsen.io/consistency/models/read-your-writes

Read-your-writes is indeed useful because it makes code easier to write: every process can behave as if it was the only one in the world, devs can write synchronous code, that's great ! But you don't need strong consistency.

I hope developers learn a little bit more about the domain before going to strong consistency.

I am not an expert, but from the examples in the article I think the author is looking for a bit more than read-your-writes.

E.g. They mention reading a list of attachements and want to ensure they get all currently created attachements, which includes the ones created by other processes.

So they want to have "read-all-writes" or something like that.

Read-your-writes is a client guarantee, that requires stickiness (i.e. a definition of “your”) to be meaningful. It’s not a level of consistency I love, because it raises all kinds of edge-case questions. For example, if I have to reconnect, am I still the same “your”? This isn’t even the some rare edge case! If I’m automating around a CLI, for example, how is the server meant to know that the next CLI invocation from the same script (a different process) is the same “your”? Sure, I can fix that with some kind of token, but then I’ve made the API more complicated.

Linearizability, as a global guarantee, is much nicer because it avoids all those edge cases.

  • Oh, read-your-writes is definitely not a solution to all problems, but to ditch it and go directly for strong consistency is... a bit radical