protocol-buffers

Internal Server Error

I am getting an unusual error while running my application, just wondering if anyone has come across this before. I am using google protocol buffers, my servlet takes a request and tries to process it, I have the following code: InputStream s = request.getInputStream(); AdRequest adRequest = AdRequest.parseFrom(s); After executing th...

Protocol Buffers with Extensions.

I'm perhaps overlooking something, but I'm attempting to wrestle protocol buffers into an easy method for providing extensions later. That seems a bit unclear so I'll jump directly into the problem. I am writing an assembly to support various tasks, one of which includes describing structured data. Perfect time to use protocol buffers...

C# generic type in a base class

I'm writing a system that has a set of protocol buffers (using protobuf-net), I want to define something like this in an abstract class they all inherit off: public byte[] GetBytes() however, the protocol buffer serealiser requires a type argument, is there some efficient way to get the type of the inheriting class? Example: public ...

How do I generate a .proto file from a C# class decorated with attributes?

Trying to get my mind around google protobuf. I found some implementation of protobuf in C# but they seems to lack one feature: the ability to generate .proto files automatically from an existing C# class decorated with attributes. The reason I want to do it this way instead of going from auto-generated C# classes from .proto file is be...

Is it possible to use Protobuf-Net with a class without a parameterless constructor?

Using Protobuf-Net, I see that it does not seem possible to deserialize a class without having a parameterless constructor or I may be missing something? I don't want some of the classes with a parameterless constructor. Is there some kind of attributes that I could use or some other technique? ...

How to use list/array of some object inheritance with Protobuf/Protobuf-net ?

Using Protobuf/Protobuf-net and two classes, one base class and the other derived from the base. How would you serialize/deserialize a list ? For instance: public class SomeBase { ... } public class SomeDerived : SomeBase { ... } And the following field to be serialized: public List<SomeBase> SomeList; Keep in mind that t...

Is there a production quality Google Protocol Buffers implementation in .NET

The title says it! I know that Jon Skeet was working on an implementation and I heard an interview (Dot net Rocks?) where he implied it was w.i.p. The latest page just shows a version number. So, is it now production ready? thanks ...

Google Protocol Buffers and HTTP

Hello, 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 solution just for serialization and now I need to send it to Java front-end. What s...

Accessing a WCF-service using Java

I'm developing a web-service using WCF, which I want to access using a client written in Java. I will encode the messages using Protocol Buffers (with Marc Gravell's protobuf-net to be exact). Is this possible to achive or must the client be written in .NET as well? I know that data serialized with Protocol Buffers is binary interopable...

Protocol Buffers Java RPC Stack

According to this Wikipedia entry: "Protocol Buffers is very similar to Facebook’s Thrift protocol, except it does not include a concrete RPC stack to use for defined services. Since Protocol Buffers was open sourced, a number of RPC stacks have emerged to fill this gap." However, there are no examples of RPC stacks cited. Can anyone ...

C++ equivalent to SerializeWithLengthPrefix

I built a communication library using Protocol Buffers (protobuf-net) using Sockets (TcpListener and TcpClient) and it is working fine, but now a co-worker needs to write a library to communicate with my software using C++. Turns out that I'm using the Serializer.NonGeneric.SerializeWithLengthPrefix and Serializer.NonGeneric.TryDeserial...

ProtoInclude for fields ?

I have a simple object [ProtoContract] public class DataChangedEventArgs<T> : EventArgs { private readonly object key; private readonly T data; private readonly DataChangeType changeType; ///<summary> /// Key to identify the data item ///</summary> public object Key { get { return key; } } ...

Deserialization fail after switching PrefixStyle to Fixed32

I have a test suite for a communication library I'm developing using protobuf-net that is running okay. All tests pass. But if I change the PrefixStyle from Base128 to Fixed32, the deserialization fail. The exception I receive from the TryDeserializeWithLengthPrefix function is: System.ArgumentNullException was caught Message="Value...

What the best ways to use decimals and datetimes with protocol buffers?

I would like to find out what is the optimum way of storing some common data type that were not included in the list supported by protocol buffers. datetime (seconds precision) datetime (milliseconds precision) decimals with fixed precision decimals with variable precision lots of bool values (if you have lots of them it looks like you...

Is it safe to convert a mysqlpp::sql_blob to a std::string?

I'm grabbing some binary data out of my MySQL database. It comes out as a mysqlpp::sql_blob type. It just so happens that this BLOB is a serialized Google Protobuf. I need to de-serialize it so that I can access it normally. This gives a compile error, since ParseFromString() is not intended for mysqlpp:sql_blob types: protobuf.Pars...

Integrate Protocol Buffers into Maven2 build

I'm experimenting with Protocol Buffers in an existing, fairly vanilla Maven 2 project. Currently, I invoke a shell script every time I need to update my generated sources. This is obviously a hassle, as I would like the sources to be generated automatically before each build. Hopefully without resorting to shameful hackery. So, my ques...

Using Protocol Buffers with Objective-C

Has anyone used Google's Protocol Buffers when developing applications in Objective-C? Are there any current projects for compiling .proto files into Objective-C, all the Google docs simply refer to Java, C++ or Python. ...

Which serializer is most forgiving for changes to the serialized types in .NET?

I noticed the XmlSerializer is more forgiving to adding new members, removing existing ones, etc to the serialized types. When I did this with the BinaryFormatter, and tried to deserialize the old data, it threw an exception. What other alternatives are there for forgiving options, i.e. one that doesn't throw an exception just uses def...

How to use google protocol buffers with java me?

i have designed a protocol using google protocol buffers and now want to write a java me client. but this implementation that i have found is severely restricted. it does not allow enums, nested messages and is very basic which defeats the purpose of using it. is there an alternative implementation of protocol buffers for java-me. ...

protocol buffers .net (protobuf-net) 10x slower that xml serializer. how come?

the title says it all. i noticed that serialization as well des deserialization takes 10x as lang with protobuf-net compared to XmlSerializer. the output files however are much smaller. i find this confusing because protobuf is such a simple format that should run very fast. any hints on how to speed it are greatly appreciated. Edit: h...