-
Notifications
You must be signed in to change notification settings - Fork 12
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
Better document implemented gRPC services #1449
base: 1.x-dev
Are you sure you want to change the base?
Conversation
@armiol Please take a look. When we are done with |
@armiol Please take a look on a second iteration. |
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.
@yevhenii-nadtochii please see my comments.
Let's discuss my comments vocally once you return back to this task.
* | ||
* <p>This class is an implementation of a corresponding gRPC service. Hence, public API of this | ||
* class is dictated by the {@linkplain CommandServiceGrpc generated code}. Despite the fact of its | ||
* "publicity", it's not meant to be used directly. Use {@link io.spine.client.Client Client} |
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 not true. It is meant to be used directly. Otherwise, users won't be able to assembly the definitions of services for their gRPC servers at server-side.
Please rephrase.
// an acknowledgement. The received `Ack` may have one of the following statuses: | ||
// | ||
// 1. `Ok` meaning the command is accepted for further processing. | ||
// 2. `Error` when a technical error occurs on the side of the application. |
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.
Please be more specific. What is a technical error? What is the "side of the application"? Both client and server make the application as a whole.
* | ||
* <pre>Ack post(Command);</pre> | ||
* | ||
* <p>But for every service, gRPC generates several clients: blocking, asynchronous, |
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.
There are two issues with this text.
-
It is pretty much the same for every method which is generated after gRPC. So it would be nice to write it once and "run everywhere" (meaning, reference, not copy).
-
The wording here is a bit harsh. We aren't the authors of gRPC. And for sure we have chosen to use them voluntarily. Therefore, they don't owe us anything. But the impression of this text is that they do.
// when the permissions of a user who made a request aren't broad enough. | ||
// | ||
// In case of internal gRPC errors or issues on a transport layer, an `Ack` would not be | ||
// received. All errors which occur on the side of gRCP should be handled by the means |
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.
"gRPC"
// | ||
// In case of internal gRPC errors or issues on a transport layer, an `Ack` would not be | ||
// received. All errors which occur on the side of gRCP should be handled by the means | ||
// of the used client stub. |
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 is not "used". Maybe, "chosen", or no word at all.
// When the command is successfully received by the application, it responds with | ||
// an acknowledgement. The received `Ack` may have one of the following statuses: | ||
// | ||
// 1. `Ok` meaning the command is accepted for further processing. |
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.
`OK`, meaning the ...
// an acknowledgement. The received `Ack` may have one of the following statuses: | ||
// | ||
// 1. `Ok` meaning the command is accepted for further processing. | ||
// 2. `Error` when a technical error occurs on the side of the application. |
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.
`Error`, when a ...
// | ||
// 1. `Ok` meaning the command is accepted for further processing. | ||
// 2. `Error` when a technical error occurs on the side of the application. | ||
// 3. `Rejection` if no technical error occurred but due to the business rules the command |
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.
`Rejection`, if no ...
This PR brings better documentation for the implemented gRPC services.