Replies: 1 comment 8 replies
-
I found so far to be quite liberating not to provide too much tooling for the user for this. I meant the protoc compiler plugins already produce idiomatic code mapping to protobuf definitions then. protobuf itself has its own rules how to name things I think. I'd be not against to provide more tooling for users, but we also could just let them use what they think is best, and our interface towards Actor invocations is just method name and a buffer holding the serialised message; in our case proto. Regarding tooling; I've followed Lightbend a bit with their Java and JS SDKs, they seem to invest quite so resources to produce the "service objects" and therefore code for the service contracts their users describe services in – hiding code generation otherwise than the API contract in proto. |
Beta Was this translation helpful? Give feedback.
-
Although we rely on serializable data types via Protobuf and our user experience in the development of our APIs so they are contract-first approaches the fact is that we do little with regard to generating code for the user. If we could generate code in different languages from protobuf declarations including the rpc type we would bring a better experience for our developer users.
The positive side effect of this approach is that by declaring service methods via protobuf's service rpc we could generate the methods of the actor's functions in the supported languages and we could guarantee the consistency of the names of these methods for the different languages. Currently we make invocations to actors passing the method name as an argument, but developers of different languages have different ways of naming their methods/functions, for example a python developer would think of a method name based on the pattern using underscore while a java developer would use the camel case pattern.
If the methods were generated from the protobuf rpc source then the command names of the actors would be declared consistently between actors regardless of the way adopted to declare their method or function in the different sdks.
Beta Was this translation helpful? Give feedback.
All reactions