protocol-buffers

Why would a Google Protocol buffers message not bind automagically in a Spring MVC controller?

I have a standard form controller to update a google protocol buffers message object that gets persisted. For the form I add the Message.Builder to the ModelMap so that I have access to the setter message. However, the values I change in the form are not automatically bound to the Builder object. I can not figure out why that doesn't wor...

Ant target for (1) compiling protocol buffer and (2) make a .jar library

Anyone can show me a pointer about how to write ant rules (build.xml) for creating a .jar file from a .proto file? Basically, I have write a legitimate example.proto and I can use the command line to compiled output java file: Struct.java internalStruct.java. What I want is to write an ant rule to automate the above process. Any exist...

Is there a good C implementation of Google Protocol Buffers

Google officially provides a C++ implementation of Google Protocol buffers, but I'm looking for a C implementation. I will not be using it myself, but my hope is that I can use this tool to generate C code for our Google Protocol Buffer definitions which I can then hand of to the C developers. I'm not looking for any RPC functionality,...

Convertion from extended ascii to utf8

How do you convert an std::string encoded in extended ascii to utf8 using microsoft visual studio 2005? I'm using google protocol buffer and it's complaining about non utf8 characters in my string if I give it without conversion, which is true... ...

Protobuf-net .proto file generation for inheritance

I am prototyping Protobuf-net to replace some of our existing C# code which is currently using [Datacontract] to Serialize objects to Xml. Using protobuffer we can easily share data with Java. I am thus very interested in the .proto file generation of Protobuf-net. This worked well for almost all the use cases I tested so far. But now ...

Using C++ for backend calculations in a web app

I'm running a PHP front end to an application that does a lot of work with data and uses Cassandra as a data store. However I know PHP will not give me the performance I need for some of the calculations (as well as the management for the sheer amount of data that needs to be in memory) I'd like to write the backed stuff in C++ and ac...

Serialize a class having an interface type member using protobuf-net

I'm unable to serialize my class using protobuf-net, the issue seems to be that protobuf-net is unable to serialize the interface. interface MyInterface { string name; } [ProtoContract] [ProtoInclude(1, typeof(MyClass1))] [ProtoInclude(2, typeof(MyClass2))] public abstract class ParentClass { [ProtoMember(1)] List<MyInterf...

protobuf.net Unexpected subtype

I'm encountering this Exception in my project using Protobuf.net: InvalidOperationException "Unexpected sub-type: foo" I have a class which I'm sending which looks like this: class message { list<bar> listOfBars; } foo inherits off bar, However protobuf seems to choke on this and generate the exception above. Is there some way ...

How does Protobuf-net support for Dictionary/KeyValuePair works?

I am trying to understand protobuf-net's Dictionary/KeyValuePair support. We would like to use the underlying binary stream and the generated proto file from java, but the generated .proto file contains what look like a custom type called Pair_String_Int32. Can someone please shed some light on this? I've got a class mapped like this:...

Extending Protobuf with my own methods

How should I add methods a Protobuf message? Suppose I have in my .proto file: package proto; message Person { required string name = 1; required int32 id = 2; optional string email = 3; } and I want to add a method, say, string concatenateNameEmail() to the message. What I do right now is I create my own C++ class like th...

Google's Protocol Buffers in c#

We are looking at using Google's Protocol Buffers to handle serialization between a c++ application and a c# application via networking. My question is, I've found a couple of different verisions for c#. Both look pretty good, however, does anyone know what is different (if anything) between the two protobuf-net jskeet / dotnet-proto...

How Protocol buffer interact with legacy protocol code

Hi,every one, I have a question about how protocol buffer interact with existed protocol mechanism,Say code below: class PacketBase { public: PacketBase(); private: int msgType; int msgLen; private: MessageBuilder* m_pMsgBuilder; /// do Write and Read From msg stream }; class LoginRequest : public PacketBase { /// here ...

Protocol Buffer better than serialization ?

I have a large data-structure which i'm serializing.At certain times i need to edit the values in the data-structure.But just for changing a small value i'll have to re-serialize it again instead of updating the changed value in file.I've heard of Google protocol buffer's.Will using it solve my problem of rewriting the file ? Is it a bet...

Requiring existence of XML elements without schema in TinyXML

I am trying to implement a short converter using TinyXML that will take an XML file (with fixed format), parse it, and populate a protobuf object with the elements. Problem is, some elements are optional in the protobuf definition and TinyXML does not have schema support. What would be a simple way to parse the elements robustly taking...

Protocol Buffers vs JDO on Google App Engine

I'm working on a mobile app that will get data from GAE, and I'm trying to decide between using Protocol Buffers and JDO. First off, I'm not sure how to make PBs persistent. I know it's just a matter of the annotation tags with JDO. I also saw this thread where they warn that PB data can't be indexed. I'm not sure if that's a problem...

Sending data from Node.js to Java over TCP

I'm trying to send messages (byte arrays) from Node.js to Java via TCP socket (serialized with protobuf). I create a server socket on the java side, and connect to it from Node: var client = net.craeteConnection(12345, "localhost") client.addListener("connect", function(){ client.write(serializedMsg1) client.end(serializedMsg...

How to import protocol buffer definitions from another Python package?

I have my directory structure like this: root/ sift/ __init__.py sift_descriptors.proto sift_descriptors_pb2.py project/ __init__.py filtered_descriptors.proto filtered_descriptors_pb2.py filtered_descriptors_test.py The root directory is in my $PYTHONPATH. I build root/sift/sift_descriptors_pb2.py usi...

Whether there are applications using protobuf in applestore ?

Are there any precedents? ...

Generic Parsing of PB in java

Hello, Is it possible to parse PB in a generic fashion in java ? I looked into GeneratedMessage and could not find a way to parse any PB byte buffer into a GeneratedMessage. Essentially, i am trying to parse a PB byte buffer into GeneratedMessage and then i would use reflection to detect fields inside it. Thanks in advance ...

Linking to generated Java protobuf code in Eclipse

Here's the workflow that I'm trying to build compile my proto files using a script, putting the generated src in a specified directory link to the generated classes in Eclipse compile my project I am easily able to do this for C++ using Eclipse CDT: In my project I choose File->New->Other and choose File under General. Then I click o...