[protobuf] C++ Builder + Protobuff

2011-09-22 Thread Stamatis Liatsos
Hello, I am having some problems when i am trying to compile the protobuf lib with the c++ builder compiler. It looks like that a lot of things need to be changed for the sources to get compiled. I have read over the internet about a guy (Dazza) that compiled the lite 2.3.0 version with some

[protobuf] Serialized Object as a value in Key-Value store.

2011-09-22 Thread Suraj
Hi, We are planning to use protocol buffer to serialized the data before inserting it into the db. Then we will be inserting this serialized string into the db. We will be storing this on SSD so look up throughput is pretty high. But since SSD's are costly, to save on the disk cost, I am

[protobuf] Serializing string arrays and Listobject[]

2011-09-22 Thread grendo
I have a very loose data bucket I am using to pass around variable row/ column type data that I do not know what it will be until runtime. Would protobuf have a problem serializing/deserializing it ? public class DataBucket { string[] FieldNames {get;set;} Listobject[] Rows {get;set;} }

[protobuf] Contribution: C++Builder Compiling

2011-09-22 Thread Scott Saad
Hi folks, I'm looking at using Protocol Buffers in a project where Embarcadero's (aka CodeGear, aka Borland) compiler, C++ Builder is being used. So far I've pulled down the read-only version of the source. I'm actively making some minor changes while building project files for the IDE. If

[protobuf] messages of different types Serialized to string.

2011-09-22 Thread Suraj
Hi, Say I have two messages a and b of types A and B respectively. Can I serialize them to the same string? Something like.. a.SerializeToString(str); b.SerializeTostring(str_new); str.append(str_new); Then while parsing, I will do, a.ParseFromString(str) and b.ParseFromString(str). I have

Re: [protobuf] messages of different types Serialized to string.

2011-09-22 Thread Henner Zeller
On Thu, Sep 22, 2011 at 03:32, Suraj surajn.v...@gmail.com wrote: Hi, Say I have two messages a and b of types A and B respectively. Can I serialize them to the same string? Something like.. a.SerializeToString(str); b.SerializeTostring(str_new); str.append(str_new); Then while parsing,

Re: [protobuf] Serialized Object as a value in Key-Value store.

2011-09-22 Thread Marc Gravell
This will depend on many factors: - how big is each fragment? Very small fragments of *anything* generally get bigger when compressed - what is the data? If it contains a lot of text data you might see benefits; however, many typical fragments will get bigger when compressed - it depends

Re: [protobuf] Serializing string arrays and Listobject[]

2011-09-22 Thread Marc Gravell
Protocol buffers works best with structured and predictable data. object sounds overly vague IMO. Most protocol buffers will not handle that; due to demand, I *do* have a feature in protobuf-net that might work for that, but it basically breaks all the interop benefits of protocol buffers. So

[protobuf] Re: Serialized Object as a value in Key-Value store.

2011-09-22 Thread Suraj
Hi Marc, Thanks for the reply. Ours is basically a text data. The record size varies, it is in the range from around 300Bytes to 3kB. But most of them will be more than 1k. I serialized one record from the production, and found that, the 3kB object, when serialized, became 728Byte string. Our

[protobuf] Re: C++ Builder + Protobuff

2011-09-22 Thread Scott Saad
Hi there. I don't have the patch you're referring to but I'm looking at getting this compiling. So far I've not had a lot of success as I'm getting hung up on the hash.h file. For some reason C++Builder is blowing up everywhere with this one. I'm still trying to track things down. I can keep

[protobuf] Re: C++ Builder + Protobuff

2011-09-22 Thread Stamatis Liatsos
The hash.h contains some functions in case ur compiler doesn't have a library with hashing functions if i am not mistaken (aka hash_map etc). C++ Builder does have those functions in its lib (xhash.h) and so those functions collide with the ones bcb provides, u will need to modify the _MSV_VER(or

[protobuf] Re: Serialized Object as a value in Key-Value store.

2011-09-22 Thread Benjamin Wright
Protocol buffers does nothing to reduce the size of strings and string data trends to compress very well. In my experience you can expect similar gains as if you had a simple text file (very good) On Sep 22, 3:05 pm, Suraj surajn.v...@gmail.com wrote: Hi Marc, Thanks for the reply. Ours

[protobuf] Re: C++ Builder + Protobuff

2011-09-22 Thread Scott Saad
Good to hear somebody else is trying to do or has tried to do this. I have defined hash/hash_map/hash_set in the section for the __BUILDERC__ (I named it _CPPBUILDER but same thing). Anyway I'm getting all sorts of E2238 errors (multiple declarations for hashKey and hash_map, etc). I'm trying