protocol-buffers

Google Protocol Buffers with Objective-C and Java

Hi, I'm looking at setting up communication between an iPhone app and a Java based server and thought that google protocol buffers might be the way to go; however I've managed to get myself a bit confused and I'm not sure the best way to go about implementing this so I was hoping for a bit of friendly advice :) Should I set up the Java...

How do I get google protocol buffer messages over a socket connection without disconnecting the client?

Hi there, I'm attempting to send a .proto message from an iPhone application to a Java server via a socket connection. However so far I'm running into an issue when it comes to the server receiving the data; it only seems to process it after the client connection has been terminated. This points to me that the data is getting sent, but ...

Is it necessary to declare attribute [DataMember(Order=n)] on public method?

In my solution, I have created public class to store value and already declare [DataContract/DataMember] attribute. For example, [DataContract] public class MeterSizeInfo { string _meterSizeId; [DataMember(Order = 1)] public string MeterSizeId { get { return this._meterSizeId; } set { this._meterSizeId ...

cmakeable version of protocol buffers.

Hello, StackOverflow community! I want to embed protocol buffers into some project that supports cmake. As I undrestood, google doesn't provide this Any suggestions? Who tried to create cmakeable protocol buffers library? Are there lots of not cross-platform places at the source or there is no at all. Where can I take it if it exists?...

Apache thrift, struct contain itself

I am looking into thrift for serialization of data. But Document says cyclic structs - Structs can only contain structs that have been declared before it. A struct also cannot contain itself One of our requirement is Struct A List of Child items Items(Items are Struct A ) So reading requirement i can't have Struct within itse...

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

I'm trying to long-term serialize a bunch of objects related by a strong class hierarchy in java, and I'd like to use protocol buffers to do it due to their simplicity, performance, and ease of upgrade. However, they don't provide much support for polymorphism. Right now, the way I'm handling it is by having a "one message to rule them...

protocol buffers with C++ client and C# back-end?

How do you connect C# back-end with a C++ front-end via HTTP or web-service equivalent? ...

How can I send multiple types of objects across Protobuf?

I'm implementing a client-server application, and am looking into various ways to serialize and transmit data. I began working with Xml Serializers, which worked rather well, but generate data slowly, and make large objects, especially when they need to be sent over the net. So I started looking into Protobuf, and protobuf-net. My probl...

What's the .proto equivalent of List<T> in protobuf-net?

To keep some consistency, we use code generation for a lot of our object models, and one of the offshoots of that has been generating the .proto files for ProtocolBuffers via a separate generation module. At this point though, I'm stumped at how to implement the generation for when it happens upon a List<T> object. It looks like this is...

Protobuf-net and and generics

I have a problem with protobuf-net and the use of generics. Given: [DataContract] public class CacheData { [DataMember(Order = 1)] public List<CacheLoadItem<int>> Foo; [DataMember(Order = 2)] public List<CacheLoadItem<int>> Bar; [DataMember(Order = 3)] public List<CacheLoadItem<int>> XXX; [DataMember(...

Protocol Buffers to file?

I am new to Protocol Buffers and seeing this as good approach to go. I created a proto file, and using compiler, I generated Java beans. Using this Java Beans, I initialize the object, and try to write it to file. The purpose is just to see how big the file is. I don't have client/server test ready at this moment to test via HTTP. I am ...

How to serialize interface-typed members with protobuf .NET?

Hello, The following test fails with this error: "System.InvalidOperationException : No suitable Default IB encoding found." [ProtoContract] public class A { [ProtoMember(1)] public IB B { get; set; } } public interface IB { } [ProtoContract] public class B : IB { [ProtoMember(1)] public int SomeProperty { get;...

Protocol buffers logging

Hi, In our business, we require to log every request/response which coming to our server. At this time being, we are using xml as standard implementation. Log files are used if we need to debug/trace some error. I am kind of curious if we switch to protocol buffers, since it is binary, what will be the best way to log request/response ...

Protocol Buffers Invalid embedded descriptor problem

Hi, I'm having some problems at runtime with some of my generated protocol buffer classes. My project layout is as follows: module/ protobuf-api/ proto/ com/foo/api/Service.proto com/foo/shared/Shared.proto org/bar/api/Message1.proto org/bar/api/Message2.proto The Service.proto file depends on Share...

linking a .proto file using qmake

Hi, I have 4 files message.proto udp.h udp.cpp main.cpp message.proto is a google protocol buffer file. I am trying to write a protocol buffer and send and receive data using UDP. udp.h and udp.cpp are just classes to implement UDP. I can write my own makefile and do the needful for this small example. Later I would require to integ...

Sending protocol buffers via REST

Hi, I am trying to implement protocol buffers for client/server using REST. I am still a bit confused if I need to send protocol buffers request in byte format? I mean, in my client code, do I need to serialize object to byte array? For example protoRequest.build.toByteArray() And in the server, do I need to c @POST @Consumes...

Protocol Buffers MIME problem

Help! Trying to implement Protocol Buffers via Rest (Jersey), but get this exception. class com.util.ProtobufMessageBodyReader class com.util.ProtobufMessageBodyWriter Jul 6, 2010 3:43:37 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-9102 Jul 6, 2010 3:43:37 PM org.apache.catalina.startup.Catali...

How can I streamline complex nested protobuf validation in C++?

I'm using Google protocol buffers in a messaging application. The protos are often nested several levels deep, and we have taken Google's advice and made them all optional. The protos can describe many different types of overlapping messages - i.e. a message of Type == X should contain the member my_X, Type == Y should contain my_Y. Fu...

protobuf-net and rpc over tcp

I'm looking for a rpc over tcp implementation that uses protobuf-net (or any other .net implementation of protobuf). Any suggestions? ...

Using the same .proto file for both a C# and C++ project

I am attempting to use the same .proto file (protobuf) for a C# and a C++ project. My problem is that the C# file requires an import and some options set (protobuf-csharp-port) while the C++ file doesn't. Is there any way I can tell protoc to ignore imports/options under certain circumstances? Currently my only way around this is to cr...