-
Notifications
You must be signed in to change notification settings - Fork 551
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
feat(AIP-136): prohibit "async" in custom method RPC names #1105
Conversation
aip/general/0136.md
Outdated
@@ -44,6 +44,9 @@ services. The bullets below apply in all three cases. | |||
- The name **must not** contain prepositions ("for", "with", etc.). | |||
- The verb in the name **should not** contain any of the standard method verbs ([Get][], | |||
[List][], [Create][], [Update][], [Delete][]). | |||
- The name **must not** include the term `Async`. Instead, the verb `Begin` **may** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to suggest anything? The fact that it's an LRO should already indicate it's async, and we should be extrapolating from the RPC interface as much as possible.
I guess the distinction is critical when there's a synchronous / async version. In that case Start
could also be a good synonym, but that might also cause problems if we're trying to introduce a job pattern. Just brainstorming.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is to differentiate, I'd say we should clarify that you shouldn't add any prefix and the only situation is if you're trying to create an LRO variant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was to differentiate in the only case I've come across, which was when there were already standard methods. Will add something.
31722a1
to
0d8f7e6
Compare
aip/general/0136.md
Outdated
- The name **must not** include the term `Async`. Instead, if the intention is | ||
to differentiate between immediate and long-running RPCs, the verb `Begin` **may** | ||
be used for this purpose. For example, to create a long-running book creation RPC | ||
(if the standard `CreateBook` method was designed before long-running aspects were |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "longrunning" was discussed as the suffix offline? would that not work?
- it's a suffix: easy to add to the end and still have pattern matching on the relevant prefix portion
- hints at the major difference: LRO vs non-LRO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was definitely suggested, as was this - more discussion needed, I think. (I'm happy to change this to CreateBookLongRunning
if that's preferred.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only blocker for my approval, so if you're happy to change it I'd love that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you can continue discussion in the internal space to get consensus, I'll fix it up tomorrow UK time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack, we have the design meeting tomorrow too, where we could discuss.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I said this in offline but: I'm supportive of LongRunning as a prefix/suffix when introducing an asynchronous variant of a synchronous method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. I probably won't be able to make the meeting tomorrow, but I'm happy with whatever everyone else agrees :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suffix, LongRunning
, works for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds like a quorum. Thanks - will update tomorrow UK time, and ping for final approvals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
No description provided.