Questions tagged [protocol-buffers]

For questions about Google's protocol buffers

Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages.

https://developers.google.com/protocol-buffers

7638 questions
60
votes
8 answers

Using Spring Boot together with gRPC and Protobuf

Anyone having any examples or thoughts using gRPC together with Spring Boot?
Markus
  • 941
  • 2
  • 8
  • 7
59
votes
3 answers

Protocol Buffer vs Json - when to choose one over another

Can anyone explain when to use protocol buffer instead of JSON for micro-services architecture? And vice-versa? Both on synchronous and asynchronous communication.
Kaidul
  • 15,409
  • 15
  • 81
  • 150
57
votes
10 answers

How do I get Eclipse to resolve classes generated with Maven 2?

I'm using Google Protocol Buffers to generate some Java classes for my project. Using Maven 2 and its "antrun" plugin, these classes are freshly generated before compile, output to target/generated-sources and put on the classpath during the build.…
Hanno Fietz
  • 30,799
  • 47
  • 148
  • 234
56
votes
2 answers

What is the point of google.protobuf.StringValue?

I've recently encountered all sorts of wrappers in Google's protobuf package. I'm struggling to imagine the use case. Can anyone shed the light: what problem were these intended to solve? Here's one of the documentation links:…
wvxvw
  • 8,089
  • 10
  • 32
  • 61
55
votes
7 answers

High performance serialization: Java vs Google Protocol Buffers vs ...?

For some caching I'm thinking of doing for an upcoming project, I've been thinking about Java serialization. Namely, should it be used? Now I've previously written custom serialization and deserialization (Externalizable) for various reasons in…
cletus
  • 616,129
  • 168
  • 910
  • 942
53
votes
4 answers

Dictionary in protocol buffers

Is there any way to serialize a dictionary using protocol buffers, or I'll have to use Thrift if I need that?
ibz
  • 44,461
  • 24
  • 70
  • 86
52
votes
2 answers

How does protocol buffer handle versioning?

How does protocol buffers handle type versioning? For example, when I need to change a type definition over time? Like adding and removing fields.
CodingHero
  • 2,865
  • 6
  • 29
  • 42
50
votes
4 answers

Thrift, Avro, Protocolbuffers - Are they all dead?

Working on a pet project (cassandra, spark, hadoop, kafka) I need a data serialization framework. Checking out the common three frameworks - namely Thrift, Avro and Protocolbuffers - I noticed most of them seem to be dead-alive having 2 minor…
dominik
  • 613
  • 2
  • 6
  • 10
48
votes
1 answer

protocol buffer lite versus regular protocol buffer

I've been investigating c++ serialization frameworks will small footprint and good performance. I've found this thread c++ network serialization which basically suggest to use the lite version of protocol buffers. It is not clear from this page what…
lurscher
  • 25,930
  • 29
  • 122
  • 185
48
votes
2 answers

How to get protobuf enum as string?

Is it possible to obtain the string equivalent of protobuf enums in C++? e.g.: The following is the message description: package MyPackage; message MyMessage { enum RequestType { Login = 0; Logout = 1; } optional…
Alexandru Irimiea
  • 2,513
  • 4
  • 26
  • 46
48
votes
11 answers

Install Protocol Buffers on Windows

I am unable to find clear instructions to install Google Protocol Buffers (including compiler) on Windows x64 platform. I went through the instructions README file for compiler and source: For Compiler: To install, simply place this binary…
aces.
  • 3,902
  • 10
  • 38
  • 48
47
votes
4 answers

How does Google Protocol Buffers compare to ASN.1

What are the most noticable differences between Google Protocol Buffers and ASN.1 (with PER-encoding)? For my project the most imporant issue is the size of the serialized data. Has anyone done any data-size comparisons between the two?
Yrlec
  • 3,401
  • 6
  • 39
  • 75
47
votes
6 answers

Is there an example on how to generate protobuf files holding trained TensorFlow graphs

I am looking at Google's example on how to deploy and use a pre-trained Tensorflow graph (model) on Android. This example uses a .pb file at: https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip which is a link to a file…
Shanqing Cai
  • 3,756
  • 3
  • 23
  • 36
46
votes
2 answers

protoc not generating service stub files

I have just started playing with google proto. When I try to compile proto file present in proto-java example, it does not generate any grpc file. proto…
Raman Sonkhla
  • 461
  • 1
  • 4
  • 3
46
votes
5 answers

Google Protocol Buffers and HTTP

I'm refactoring legacy C++ system to SOA using gSoap. We have some performance issues (very big XMLs) so my lead asked me to take a look at protocol buffers. I did, and it looks very cool (We need C++ and Java support). However protocol buffers are…
Nazgob
  • 8,502
  • 4
  • 40
  • 42