-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should we have multiple readwrite interfaces that capture different consistency models? #32
Comments
IMO: yes, we should. I'd suggest that the "primary" interface should have a relaxed -- but still useful -- consistency model, plus at least one more interface that provides strict serializability (i.e. linearizable and serializable). I also think we need to think carefully about what the consistency model for the "primary" interface should be -- and document it clearly. Just saying it's "eventually consistent" has the virtue of giving exporters (e.g. hosts) maximum flexibility, but at the cost of being too weak for many applications. For example, if I call That said, a very weak consistency model can still be useful for some apps -- we just need to decide how common those are vs. those which need stronger guarantees. Are we hitting 80% of use cases, or just 20%? |
I very much agree with the statement of hit the 80% use case. Now that I think back on what I have used and see used, it might be best to say that the level of consistency any one of these should guarantee is "read-your-writes." I am curious if that is other people's experience as well. As for providing another consistency model, I don't think I am in favor of this for the first go around. But I wanted to clarify what you meant here @dicej. Were you meaning that something like the "batch" or "atomic" interfaces would count as the secondary interface, or were you thinking of supporting another consistency model? Totally in favor of the former, but have some hesitations on the latter (which I can address depending on your answer) |
I meant something orthogonal to the "batch" and "atomic" interfaces, e.g. something like:
To be clear: I don't think this is a "must have", but there are some applications for which these semantics are required, and we'll need to decide if (and when) we should support them (and whether that should be in |
Ok, then I think I am in complete agreement with you. I would love to address that need for another interface (and where it should live) after we get this first draft out |
Works for me. FWIW, I wrote about state management in the context of handling incoming WebSocket frames here, including a concrete example that relies on a strict consistency model. Some of the discussion is Spin-specific, but could easily be generalized to a wasi-cloud app that uses both |
First, just as a clarification, the proposal as-is already provides two distinct levels of consistency in different interfaces: That being said, I do appreciate the argument that it's useful to reduce cognitive load when a new users shows up and wants to know "what should I use" and doesn't know anything about "consistency models". In this context, since all the common key-value stores I'm aware of seem to default to eventual consistency, I think the argument could be made that this is a reasonable default expectation and so we don't need to explicit call out "eventual consistency" in the name and thus we can give the eventually-consistent interface the most obvious "use me" sort of name. As for what the ideal "use me" sort of name is: independently of this whole discussion, I realized that it's really nice when WASI interface names are nouns, since then when a component imports, say, Since the same argument applies against |
Thanks @lukewagner! I'll be working on opening a PR soon with some proposed changes and I'll fold this in |
I prefer to leave this issue open since #41 only changes |
FWIW, we already have multiple consistency levels present (with |
I figured we definitely would have those discussions, but wonder if we should close this so people can open more scoped proposals later. I think the answer to this issue itself (Should we have multiple readwrite interfaces that capture different consistency models?) is "Yes!" And then we can open new issues when people are ready to add them. Either way I don't mind, was just doing a bit of housekeeping |
Originally posted by @Mossaka in #30 (comment)
The text was updated successfully, but these errors were encountered: