Using Spring Boot together with gRPC and Protobuf

If it’s still relevant for you, I’ve created gRPC spring-boot-starter here. grpc-spring-boot-starter auto-configures and runs the embedded gRPC server with @GRpcService-enabled beans. The simplest example : @GRpcService(grpcServiceOuterClass = GreeterGrpc.class) public static class GreeterService implements GreeterGrpc.Greeter { @Override public void sayHello(GreeterOuterClass.HelloRequest request, StreamObserver<GreeterOuterClass.HelloReply> responseObserver) { // omitted } } There is also an example of how … Read more

Protobuf: Will set_allocated_* delete the allocated object?

Since asking the question I have continued to find the answer. Maybe someone is interested in the answer, too. From here: https://developers.google.com/protocol-buffers/docs/reference/cpp-generated void set_allocated_foo(string* value): Sets the string object to the field and frees the previous field value if it exists. If the string pointer is not NULL, the message takes ownership of the allocated … Read more

Generate Protobuf documentation? [closed]

[Update: Aug 2017. Adapted to the full Go rewrite of protoc-gen-bug, currently 1.0.0-rc] The protoc-doc-gen, created by @estan (see also his earlier answer) provides a good and easy way to generate your documentation in html, json, markdown, pdf and other formats. There are number of additional things that I should mention: estan is no longer … Read more

what’s the right way to do polymorphism with protocol buffers?

In proto3 the extend keyword has been replaced. From the docs: If you are already familiar with proto2 syntax, the Any type replaces extensions. syntax = “proto3”; import “google/protobuf/any.proto”; message Foo { google.protobuf.Any bar = 1; } But beware: Any is essentially a bytes blob. Most of the times it is better to use Oneof: … Read more

boost serialization vs google protocol buffers? [closed]

I’ve been using Boost Serialization for a long time and just dug into protocol buffers, and I think they don’t have the exact same purpose. BS (didn’t see that coming) saves your C++ objects to a stream, whereas PB is an interchange format that you read to/from. PB’s datamodel is way simpler: you get all … Read more

Are there C++ equivalents for the Protocol Buffers delimited I/O functions in Java?

I’m a bit late to the party here, but the below implementations include some optimizations missing from the other answers and will not fail after 64MB of input (though it still enforces the 64MB limit on each individual message, just not on the whole stream). (I am the author of the C++ and Java protobuf … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)