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
4
votes
1 answer

Generate .proto file for complex Java object

I want to serialize a complex Java object throw Internet. First time, I used Google Gson to serialize the class. Gson offers an easy way to serialize object into JSON string and deserialize from JSON string to object via toJson and fromJson.…
Richard Le
  • 639
  • 2
  • 9
  • 20
4
votes
1 answer

protocol buffers: how to serialize and deserialize multiple messages into a file (c++)?

I am new to Protocol Buffers and c++ but my task requires me to use the two. I want to write a structure of data ( message) into a single file multiple times and be able to read the data. i can read and write a single message but multiple messages…
user3499746
  • 55
  • 1
  • 1
  • 6
4
votes
2 answers

Is it possible to use Apache Thrift without RPC?

I searched on the internet but couldn't find anything useful. First, I was thinking to use Protocol Buffers but it doesn't provide built in feature to track multiple messages (where one message finish and second starts) or message self delimiting,…
User
  • 619
  • 1
  • 9
  • 24
4
votes
1 answer

Using protobuf enum value as a field number

I'm wondering if it is possible to use Google Protocol Buffers' enum constants as a field number of other messages, like enum Code { FOO = 100; BAR = 101; } message Message { required string foo = FOO; } This code doesn't work because FOO's…
lyomi
  • 4,230
  • 6
  • 30
  • 39
4
votes
2 answers

Build protobufs only using Qt and tools shipped with it

I'm developing Qt application on Win 7 (using Windows Qt distro with MinGW included) and I need to use Google's protocol buffers. So I followed this How to build Google's protobuf in Windows using MinGW? and I have managed to build it. But it was…
Kousalik
  • 3,111
  • 3
  • 24
  • 46
4
votes
2 answers

Stream data into protobuf parser c++

Context I am writing an event-driven application server in C++. I want to use google protocol buffers for moving my data. Since the server is event driven, the connection handler API is basically a callback function letting me know when another…
Mr. Developerdude
  • 9,118
  • 10
  • 57
  • 95
4
votes
4 answers

Which is the most efficient serialization techninqe that must be language independent

Currently I am starting a project, which needs to serialize the data from .net application ( c# app) and pass it throug a network to a java based server application. Therefore I would like to know which serialization mechanism is most efficient and …
4
votes
2 answers

Efficiently Converting Java List to Matlab Matrix

I am calling the Google Protocol Buffers Java API from Matlab. This works pretty well, but I have hit a big performance bottleneck. The bulk of the data are returned as objects of type: java.util.Collections$UnmodifiableRandomAccessList They…
Andrew McLean
  • 383
  • 4
  • 11
4
votes
1 answer

writeDelimitedTo/parseDelimitedFrom seem to be losing data

I am trying to use protocol buffer to record a little market data. Each time I get a quote notification from the market, I take this quote and convert it into a protocol buffers object. Then I call "writeDelimitedTo" Example of my recorder: try { …
eak12913
  • 303
  • 4
  • 15
4
votes
1 answer

Handling Custom options within a protoc plugin

I'm trying to develop a plugin in order to autogenerate code that is specific to my application. While a maybe simpler strategy is to make my code use the files generated by the c++ plugin I'm trying to write the plugin from scratch. So as explained…
PeppeDx
  • 133
  • 1
  • 10
4
votes
2 answers

Protobuf concatenation of serialized messages into one file

I have some serialization in google protobuf in a series of files, but wonder if there is a shortcut way of concatenating these smaller files into one larger protobuf without worrying about reading each and every protobuf and then grouping these…
disruptive
  • 5,687
  • 15
  • 71
  • 135
4
votes
2 answers

How to handle different versions of python protobuf

My python package contains a lot of files compiled by python-protobuf (python2-protobuf-2.5.0 on Arch Linux), I installed the package on Ubuntu server 12.04.3 (which have python-protobuf-2.4.1), tried to run the code, and hit the following…
Romstar
  • 1,139
  • 3
  • 14
  • 21
4
votes
1 answer

Inconsistencies after deserialization using protobuf-net

I am facing a problem of inconsistency after deserialization using protobuf-net. The class I would like to serialize/deserialize looks like: [ProtoContract] public class TSS { [ProtoMember(1, AsReference = true)] public EventManager…
Lin
  • 97
  • 1
  • 8
4
votes
2 answers

Android Http request and response using protocol buffer

I am very new for the protocol buffer topic. but i know the json parsing and all about that For now i am actually working on this protocol buffer i am making one application which Http request and Response using android with protocol buffer. I am…
4
votes
1 answer

How to create Object from XML using using `protocol buffer` and `protobuf-java-format` in java

I am creating a sample program using protocol buffer and protobuf-java-format.My proto file is package com.sample; option java_package = "com.sample"; option java_outer_classname = "PersonProtos"; message Person { required string name = 1; …
The PowerHouse
  • 560
  • 14
  • 29