Where to store proto files which are shared among projects?

I would suggest storing the .proto files in a separate project. These are the contract between your two projects, and they are not necessarily “owned” by either one. Storing them in a separate project provides neutral ground for both project members to negotiate changes to the files – for example through a pull/merge request process … Read more

gRPC + Image Upload

For large binary transfers, the standard approach is chunking. Chunking can serve two purposes: reduce the maximum amount of memory required to process each message provide a boundary for recovering partial uploads. For your use-case #2 probably isn’t very necessary. In gRPC, a client-streaming call allows for fairly natural chunking since it has flow control, … Read more

How to mark rpc as deprecated

TL;DR: It’s possible, but it does not generate a compiler warning. Consider to use field-level deprecation. It looks like it’s possible to add a deprecated option to a service, just like on a message and enum like: service MyService { rpc GetThings(GetThingsRequest) returns (GetThingsResponse) { option deprecated = true; }; } Found this in: https://github.com/google/protobuf/issues/1734 … Read more

Google Protocol Buffers – Storing messages into file

I would recommend using the writeDelimitedTo(OutputStream) and parseDelimitedFrom(InputStream) methods on Message objects. writeDelimitedTo writes the length of the message before the message itself; parseDelimitedFrom then uses that length to read only one message and no farther. This allows multiple messages to be written to a single OutputStream to then be parsed separately. For more information, … Read more

How to share Protobuf definitions for gRPC?

Unfortunately, there is no common practice, although the main goal that you should achieve is to store proto files in one version control repository. During my investigation, I’ve found some interesting blog posts about that subject: https://www.bugsnag.com/blog/libraries-for-grpc-services https://www.crowdstrike.com/blog/improving-performance-and-reliability-of-microservices-communication-with-grpc/ https://medium.com/namely-labs/how-we-build-grpc-services-at-namely-52a3ae9e7c35 They covers much of gRPC workflow considerations. Hope that helps!

protoc: command not found (Linux)

Install protoc for Linux and Mac Linux PROTOC_ZIP=protoc-3.15.8-linux-x86_64.zip curl -OL https://github.com/google/protobuf/releases/download/v3.15.8/$PROTOC_ZIP sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc sudo unzip -o $PROTOC_ZIP -d /usr/local include/* rm -f $PROTOC_ZIP Mac OS X brew install protobuf Alternately, if you don’t have Homebrew. PROTOC_ZIP=protoc-3.15.8-osx-x86_64.zip curl -OL https://github.com/google/protobuf/releases/download/v3.15.8/$PROTOC_ZIP sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc sudo unzip -o $PROTOC_ZIP … Read more

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