Java IDL for gRPC / protobuf (Protocl Buffers)

Is it possible to define protocol buffers using Java?

It is instead

service Greeter { rpc SayHello (HelloRequest) returns (HelloReply) {} } 

I would like to have

 public interface Greeter { @Grpc HelloReply sayHello (HelloRequest req); } @GrpcMessage() public class HelloReply{ @GrpcField(1) string name; } 

This is an annotation, like Hibernate / JPA over my POJO, instead of a bunch of generated code.

I could only find the dynamic protocol schemes of the Buffer https://github.com/os72/protobuf-dynamic

0
java protocol-buffers pojo grpc idl
Nov 04 '16 at 2:30
source share
1 answer

Take a look at protostuff: https://github.com/protostuff/protostuff It supports what you want for protobuf (although not for grpc, perhaps it can be improved)

+1
Nov 08 '16 at 17:04
source share



All Articles