Hi guys, I've just started to work with Protobuf and I am wondering how to write good .proto files.
Are there any best practices, guides, conventions or smth similar??
I got an idea about services:
1. UserService {
rpc CreateUser(CreateUserRequest) return (CreateUserResponse) - good
rpc CreateUser(string first_name, string last_name, int32 age) return (ClientResponse) - ugly
}
2. But what do you think about messages segregation ?
I think it's good strategy of putting all the messages in separate files instead of a single file.
In this case it's easier to maintain and reuse messages, but there are a lot of examples on the internet and on official protocol-buffers
website where all messages are placed in one file.
My founds: