Skip to content
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

fix(AIP-121): clarify stateless protocol definition #1184

Merged
merged 6 commits into from
Jul 27, 2023

Conversation

noahdietz
Copy link
Collaborator

Clarifies definition of a stateless protocol as applied to resource oriented APIs after some confusion created by the lack of concrete/applied language.

cc: @Berg3

@noahdietz noahdietz requested a review from a team as a code owner July 24, 2023 17:24
@noahdietz noahdietz requested review from toumorokoshi, hrasadi and andrei-scripniciuc and removed request for toumorokoshi July 24, 2023 17:24
@bgrant0607
Copy link
Contributor

bgrant0607 commented Jul 25, 2023

I think the AIPs follow the usual definition of "stateless protocol". For example:
https://en.wikipedia.org/wiki/Stateless_protocol
https://en.wikipedia.org/wiki/Representational_state_transfer

There's no "session" state.

etag could maybe be called out as a stateful feature.

@noahdietz
Copy link
Collaborator Author

@bgrant0607 was your comment meant to be elicit a specific change? Did you want to see mention of "no 'session' state" in this section? I kind of thought that the following phrase spoke to that point:

each request happens in isolation of other requests made by that client or another

I'm happy to change stuff, but would appreciate a more pointed comment.

etag could maybe be called out as a stateful feature.

Yeah good point, I think I see what you are getting at. A client must have the latest etag (perhaps retrieved via a preceding GET) in order to mutate a resource. So the client and server state must match, effectively a "session". Is that what you are getting at?

I don't think that exactly violates the statement each request happens in isolation of other requests made by that client or another because technically the request, even with an invalid etag, is processed independently of requests made previously, regardless of if the response is an error due to etag mismatch or not. Of course our backends aren't stateless, but the protocol in which we communicate with it is. WDYT? Is that a fair analysis?

@bgrant0607
Copy link
Contributor

@noahdietz I was just commenting that I believe the term "stateless protocol" is used here with its typical meaning. We could link to wikipedia or another source.

@noahdietz
Copy link
Collaborator Author

@noahdietz I was just commenting that I believe the term "stateless protocol" is used here with its typical meaning. We could link to wikipedia or another source.

Oh ok, I see. Indeed a source would be good, too avoid more confusion in the future.

@noahdietz
Copy link
Collaborator Author

Added a link! Thanks for that @bgrant0607

Copy link
Contributor

@bgrant0607 bgrant0607 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@noahdietz noahdietz merged commit 4dc1f2d into aip-dev:master Jul 27, 2023
2 checks passed
@noahdietz noahdietz deleted the stateless-protocol branch July 27, 2023 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants