-
Notifications
You must be signed in to change notification settings - Fork 5
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
Standardize the naming of GRPC Functions/Commands and Message Types #218
Comments
Also adding my previous comment from nodes CLI MR: https://gitlab.com/MatrixAI/Engineering/Polykey/js-polykey/-/merge_requests/198#note_633812954
|
The prefix of GRPC commands should be used to group the relevant calls together. We have a natural grouping of calls by default which are the domains:
Where Furthermore Relevant message types should also be structured in the same way. For variants of the same call, use a suffix. Like:
For example:
We also need to standardize on the relevant side-effectul verbs/actions. Here are some ideas from RESTful terminology:
I also like CRUD in general:
With 2 additions:
In that case, it is possible to also have
Different domains may have domain specific action terminology. Make sure that everybody drafts these up during their MR refactoring. @emmacasolin @DrFacepalm @tegefaulkes @joshuakarp @scottmmorris |
Another thing is because GRPC calls are always one to one from Client to Server. The calls are always named with respect to the Client. The Client is the "subject" in the SOV order. So for example, if the server is meant to receive a notification from the client. Then the call should not be named |
Interesting that SOV word order is the most common in all human languages. |
There are some message types like This is fine for now to represent the input/query message to refer to a vault or node. We can address other naming issues later. For now as long as the prefix is the domains, this will make it clearer. |
While including the domains inside the GRPC functions makes sense, I'm not sure it does for the message names. So I think keeping message names like |
Good point. What we can do is do a hierarchy/taxonomy of message types.
Begin with the basic primitive messages that are used by everything. And
then domain specific message types.
We can figure this out after sessions MR fixes gets merged.
…On 8/13/21 1:00 PM, Brian Botha wrote:
While including the domains inside the GRPC functions makes sense, I'm
not sure it does for the message names.
In the case of |NodeMessage| it contains information specific to a
node. It can be used in function calls inside the identities domain or
the nodes domain and as such. is not really specific to a domain.
Also, it is always used in the context of a grpc call. Such as
|NodesGetNode(NodeMessage)|.
So I think keeping message names like |NodeMessage| or |VaultMessage|
is the better option here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#218 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE4OHOV7PEJXKQQL6QPT5LT4SDDRANCNFSM5A7FPHSQ>.
|
I've noticed that the naming of the command files aren't standardised atm. For example:
Let's simplify this. For example:
Can instead be:
|
Ok it seems that file structure in the What's left is cleaning up all remaining GRPC and Protobuf types. We'll do a once over at the end and we can close this issue and move this standard into the wiki. |
Protobuf definitions have been updated in MR https://gitlab.com/MatrixAI/Engineering/Polykey/js-polykey/-/merge_requests/210. Protobuf definitions have been updated to follow the following standard.
|
This is done now @emmacasolin @joshuakarp please rebase your nodes CLI MR once you start it. @scottmmorris since @tegefaulkes is working with you on the EFS and vaults, then it's also time to rebase the vaults refactoring. |
Important to keep this standard as we move forward! |
The naming of GRPC functions/commands and message types is getting confusing. We need to have a standard way of naming with:
This is a renaming procedure, no new functionality should be done. But we may identify things that are missing or types that can be merged together.
Do note that all GRPC commands requires an input message type and an output message type.
Tasks
The text was updated successfully, but these errors were encountered: