Re: [protobuf] Performance for Messages containing big (1...100MByte) binary blobs

2018-01-11 Thread Henner Zeller
On 11 January 2018 at 04:20, Mario Emmenlauer wrote: > > Hi, > > On 11.01.2018 13:13, rschoe@gmail.com wrote: >> Hi, >> How do Protocol Buffers (C++) perform when messages contain big binary >> blobs? With big I mean 1 ... 100MByte. > > My impression was that its not

Re: [protobuf] "out of memory" issue after integrating Protobuf in my project

2018-01-01 Thread Henner Zeller
On 1 January 2018 at 01:48, Krishna Patsariya wrote: > Hi All, > > I am facing one strange issue after integrating Protobuf in my project. > > "cc1: out of memory allocating 3355443200 bytes after a total of 585728 > bytes". It might be useful to include what files you

Re: [protobuf] Why doesn't C++ libpropobuf accept defult values?

2017-07-01 Thread Henner Zeller
Required really means that you need to store values in there. Default only makes sense for the optional fields (because only in the optional fields, it is possible to _not_ set a value, so in that case, you get the default). That answers your question in which cases you use defaults. So sounds

Re: [protobuf] How to serialize/deserialize bytes data?

2016-12-22 Thread Henner Zeller
On 22 December 2016 at 14:50, wrote: > Thanks for the reply. > > My question here is: I use protobuffer to store a bytes data, how can I > retrieve it back? Symmetric to the SerializeToArray(), use ParseFromArray() or ParseFromString() to parse a serialized version of a

Re: [protobuf] (objective-c) How to trigger code re-generation

2015-11-09 Thread Henner Zeller
Isn't this what Makefiles are for ? On 9 November 2015 at 09:14, Rob Cecil wrote: > I'm using Cocoapods and my initial project build succeeds. Steps > > 1. Created .podspec referencing my .protos and output directory for > generated objective-c code. > 2. Created podfile >

Re: [protobuf] file transfer using protobuf

2015-05-21 Thread Henner Zeller
AM UTC-7, Henner Zeller wrote: On 5 October 2013 19:43, Kaustubh Deshmukh kaud...@gmail.com wrote: Can I transfer file using google protobuf? The 'bytes' type can store arbitrary content. If you want to transfer huge files, they you might want to design a protocol araound it by sending

Re: [protobuf] protoc generator : The code of constructor ... is exceeding the 65535 bytes limit

2015-01-08 Thread Henner Zeller
On 5 January 2015 at 05:09, ravi kiran tunuguntla ravionl...@gmail.com wrote: protoc generated code could not be compiled. (as the constructor code has exceeded 65535 bytes limit). What can be done to work around this? Use less fields :) Your protocol buffer looks pretty degenerated using all

Re: [protobuf] Partially serialize/deserialize protocol buffers

2014-12-30 Thread Henner Zeller
On 29 December 2014 at 10:53, Li Yan magma917...@gmail.com wrote: Hey guys, From https://developers.google.com/protocol-buffers/docs/encoding, I basically understand how to encode protocol buffers: the keys and values are concatenated into a byte stream. My question is whether there exists

Re: [protobuf] zeromq with protobuf segmentation fault while parsing in c++

2014-07-02 Thread Henner Zeller
On 30 June 2014 00:41, Nayab Rasul rasulnra...@gmail.com wrote: I am using zeromq with protobuf to send/recieve messages but code was crashing on receiver end while *ParseFromString *with Segmentation fault error. Scan is my message and i has float data types as repeated filed.

Re: [protobuf] Deprecated field annotations in gcc

2014-05-30 Thread Henner Zeller
On 30 May 2014 14:38, 'Feng Xiao' via Protocol Buffers protobuf@googlegroups.com wrote: On Thu, May 29, 2014 at 5:23 PM, Priyendra Deshwal desh...@thoughtspot.com wrote: Hey guys, It seems like the deprecated field annotations in gcc are no longer emitted by the protobuf compiler and the

Re: [protobuf] support for bit fields?

2014-05-19 Thread Henner Zeller
On 19 May 2014 17:43, cinyoung hur hur...@gmail.com wrote: Hello, I would like to apply bit fields. For example, struct{ unsigned int version : 1; unsigned int type: 1;} status; OR is there other tips to handle these examples? There are no bit-fields provided in the proto

Re: [protobuf] C++ ParseFromCodedStream takes too long

2014-03-20 Thread Henner Zeller
On 20 March 2014 06:10, christian.kilpatrick.1...@gmail.com wrote: Oh yes you are right. There was a mistake in my calculation. Well I'll try without the submessage. The count of docid and of score is always the same. So there is no Problem for me. But it's sad that java takes around 2

Re: [protobuf] Can I flush all protocol buffers using a static class method?

2014-01-24 Thread Henner Zeller
On 24 January 2014 07:05, Alex Wakefield forg...@gmail.com wrote: I would like to flush all data stored in the protocol buffers to disk, but I don't have a handle to the individual buffer objects. Is there a way to flush all of the buffers? Can you be a bit more concrete ? What do you want

Re: [protobuf] it would be cool if there are some functions that parse pb from (or serailize pb to) a vector of buffers

2013-12-12 Thread Henner Zeller
On 11 December 2013 18:45, wilesd...@gmail.com wrote: when recv data from tcp socket, we don't know how long the packet will be. Generally, I would pre-alloc(for the sake of reusing) a vector of buffers which each buffer has the same size. The problem is that it's hard to parse pb from the

Re: [protobuf] file transfer using protobuf

2013-10-07 Thread Henner Zeller
On 5 October 2013 19:43, Kaustubh Deshmukh kaudes...@gmail.com wrote: Can I transfer file using google protobuf? The 'bytes' type can store arbitrary content. If you want to transfer huge files, they you might want to design a protocol araound it by sending chunks that each are less than

Re: [protobuf] example of enum to string.

2013-10-07 Thread Henner Zeller
On 7 October 2013 08:58, amirk kleen.a...@gmail.com wrote: Hi, I am new to prtobuf, and I am having issues to enum to string conversion in C++. I see that there is genereated code for it (see below) but when I try to call these functions I am getting a segmentation fault. What is your

Re: [protobuf] usage of 'null' as a variable name in protobuf-2.5.0

2013-05-20 Thread Henner Zeller
On 20 May 2013 09:55, Feng Xiao xiaof...@google.com wrote: On Thu, May 16, 2013 at 10:58 PM, daniel.ng1...@gmail.com wrote: Version 2.5.0 has the following line in a couple of places in repeated_field.h: MessageLite* null = NULL; My gnu-based compiler doesn't like this as it thinks

Re: [protobuf] Re: Why to reinvent the wheel ?

2013-03-21 Thread Henner Zeller
If you look at the complicated way CORBA works and the simplicity and of Protobufs, then you know. You assume infinite resources in companies (and hence assume assume politicial statement behind protobufs), but in reality it is about getting things done. CORBA is a non-starter. On 21 March 2013

Re: [protobuf] Re: Protocol buffer performance degrading with time

2013-01-11 Thread Henner Zeller
On 11 January 2013 03:12, debop...@2pirad.com wrote: Hi Xiao Feng, The line which is getting slower with time is highlighted in yellow, below. On Friday, January 11, 2013 4:31:46 PM UTC+5:30, Feng Xiao wrote: [adding back the group] On Fri, Jan 11, 2013 at 5:53 PM, Debopam Ghoshal

Re: [protobuf] Re: Protocol buffer performance degrading with time

2013-01-10 Thread Henner Zeller
On 10 January 2013 23:30, debop...@2pirad.com wrote: Because, to process the request object (in #7), the methods which are present in the google protobuf generated file are called. The protobuf request object contains multiple requests, and the time taken to extract these (requests) is

Re: [protobuf] command not found

2012-11-10 Thread Henner Zeller
On 10 November 2012 20:29, Mohammed mr.behbo...@gmail.com wrote: I followed the instructions in https://developers.google.com/protocol-buffers/docs/cpptutorial; and at the final step when I typed sudo ./main massage.bin I was having this error command not found Why do you want to run it

Re: [protobuf] Tool to convert binary back to string representation

2012-10-06 Thread Henner Zeller
On 5 October 2012 12:28, JonathonS thejunk...@gmail.com wrote: Hi Is there a tool that will convert the serialized binary to its string representation so that I can see all the fields and their values? There is the TextFormat class that allows you to print the contents of a protocol buffer in

Re: [protobuf] Re: Odd problem with protobuf implementation in C++

2012-04-07 Thread Henner Zeller
++ implementation has such a bug that is undetected, so something else in your program is going wrong.) -h G. On Apr 5, 7:54 pm, Henner Zeller henner.zel...@googlemail.com wrote: On Thu, Apr 5, 2012 at 01:03, G. geula.vainap...@mediamind.com wrot Hi, Thanks for responding. This is exactly the way I

Re: [protobuf] Re: Odd problem with protobuf implementation in C++

2012-04-05 Thread Henner Zeller
On Thu, Apr 5, 2012 at 01:03, G. geula.vainap...@mediamind.com wrot Hi, Thanks for responding. This is exactly the way I access the fields. Code snippet: ...        b.set_billableseat(Mediamind);        b.set_category(5);        b.set_clickthroughurl(http://www.ynet.co.il;);        

Re: [protobuf] Memory leaks in VS2008 using 2.4.1

2012-03-26 Thread Henner Zeller
On Sun, Mar 25, 2012 at 06:55, Eric Holtman e...@holtmans.com wrote: I've tried building the library as static.   I've tried building the library as dll.  I've even gone so far as starting from scratch and building my own project, and including all the .cc and .h files. I cannot make the

Re: [protobuf] simple '.proto' structure

2012-02-09 Thread Henner Zeller
On Thu, Feb 9, 2012 at 03:33, MohanR radhakrishnan.mo...@gmail.com wrote: Hi,         I tried to write and read a simple '.proto' structure but when I read it back I get an exception. Is there something wrong with the way I read ? Thanks. --proto- package

Re: [protobuf] Re: suggestions on improving the performance?

2012-01-13 Thread Henner Zeller
On Fri, Jan 13, 2012 at 11:22, Daniel Wright dwri...@google.com wrote: It's extremely unlikely that text parsing is faster than binary parsing on pretty much any message.  My guess is that there's something wrong in the way you're reading the binary file -- e.g. no buffering, or possibly a bug

Re: [protobuf] tcp get packet

2012-01-03 Thread Henner Zeller
On Tue, Jan 3, 2012 at 18:37, calvin zhu calvinmy0...@gmail.com wrote: client send a proto packet to server by tcp, and how do the server certain the packet size? make a packet head? If you want to make sure that you got the whole packet, you need to add a header with the size, yes. A simple

Re: [protobuf] encode negative int32 puzzle

2011-12-05 Thread Henner Zeller
On Sat, Dec 3, 2011 at 20:07, 萌 饶 raome...@gmail.com wrote: I have a puzzle for a long time that why a negative int32 must be encoded into 10 bytes instead of 5, 5 bytes of encoded var int has enough bits(5*7=35) to represent a 32 bit value, and packet decoder know it's a int32 so it extract

Re: [protobuf] c server - java client

2011-09-29 Thread Henner Zeller
On Thu, Sep 29, 2011 at 05:34, Dominique Volery d.vol...@gmail.com wrote: hi, i'm using gpb for a client server application. on the server is a c gpb library in use and on the client the messages were generated by java. Which implementation do you use ? I only know the Google implementation

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] Repeated fields support efficient random access?

2011-08-22 Thread Henner Zeller
On Sun, Aug 21, 2011 at 22:24, Tommy Li tommy...@ucla.edu wrote: Hi, are repeated fields supposed to support efficient random access? In the in-memory representation of the protocol buffer, they are essentially stored in an array. So copying it to an array wouldn't buy you anything Or should

Re: [protobuf] Proto Buf License missing

2011-08-17 Thread Henner Zeller
On Wed, Aug 17, 2011 at 15:50, Ali Asghari bob9...@gmail.com wrote: Hi, I would love to use your code, however the license for them appears to be missing. The link provided points to a license generation tool, however I doubt our legal department will accept this as it does not directly

Re: [protobuf] Is the Protocol Buffers serialization format standardized?

2011-07-15 Thread Henner Zeller
On Fri, Jul 15, 2011 at 08:19, jl jlaben...@gmail.com wrote: We are wondering if the serialized data format used by Protocol Buffers is standardized or in some way set in stone? In other words, should we have any expectation that it will change in the future and we won't be able to read the

Re: [protobuf] Is message rename binary compatible?

2011-05-17 Thread Henner Zeller
On Tue, May 17, 2011 at 07:46, Imagination's End eda...@disemia.com wrote: Say I have a message used like this: message old_name { ... } message wrapper {  repeated old_name items = 3; } I want to rename old_name to new_name. Is this binary compatible? That is, will users of the previous

Re: [protobuf] Zero tag number in enum data type

2011-04-18 Thread Henner Zeller
On Mon, Apr 18, 2011 at 22:28, Canggih cangca...@gmail.com wrote: hello, i just wanna share. In Protobuf developer guide, in the sample proto file, there is a PhoneType enum data type, consist of MOBILE, HOME, and WORK. MOBILE use '0' as its tag number, and so on. This is the integer value

Re: [protobuf] UnmodifiableLazyStringList is not Serializable

2011-04-13 Thread Henner Zeller
On Wed, Apr 13, 2011 at 06:45, J.S. goo...@juergenschmied.de wrote: Hi! Passing a buffer with a repeated String from one EJB to another, I get:  javax.ejb.EJBException: java.rmi.MarshalException: CORBA BAD_PARAM 1398079494 Maybe; nested exception is:        

Re: [protobuf] Re: UnmodifiableLazyStringList is not Serializable

2011-04-13 Thread Henner Zeller
On Wed, Apr 13, 2011 at 16:01, Ben Wright compuware...@gmail.com wrote: I agree with J.S. on this one - there are many situations in Java EE environments where Serializable is checked or java serialization used when it's not simple or feasible to leverage protobuf serialization.  Most of these

Re: [protobuf] DebugString causing a crash

2011-04-04 Thread Henner Zeller
On Mon, Apr 4, 2011 at 00:26, des fitzgerald d...@intrepid-geophysics.com wrote: Hi, below is more orless the same example in the on-line documentation the message Foo example turned into a cppunit_test I thought the DebugString method would always work, based upon what I have read. This

Re: [protobuf] Error while de-serializing

2011-03-22 Thread Henner Zeller
On Tue, Mar 22, 2011 at 10:53, nidheeshdas nidheesh...@gmail.com wrote: I've a bool and a string in the proto file compiled to cpp both required. when i send them with empty string the bool is also getting affected. does protobuf mishandles the bools ? What do you mean with 'affected' ?

Re: [protobuf] Inheritance..

2011-03-17 Thread Henner Zeller
On Thu, Mar 17, 2011 at 02:41, ctapobep stanislav.bashkirt...@gmail.com wrote: So pity protobuf doesn't support inheritance, only because of this I can't use it. Any forecasts, are creators going to add this feature? There are good reasons not to support inheritance and it would be a design

Re: [protobuf] ProtoBuf and Multi-Threads

2011-03-15 Thread Henner Zeller
On Tue, Mar 15, 2011 at 06:05, ksamdev samvel.khalat...@gmail.com wrote: I like the interest in the topic. I've put 1GB to emphasize that the use case is safe. In fact, I save messages in file in next way: XYXYXYXYXY. where X is the size of the message and Y is the message itself. Each

Re: [protobuf] ProtoBuf and Multi-Threads

2011-03-15 Thread Henner Zeller
::io::CodedInputStream coded_in(raw_in); ... and this one should be in the loop, yes.   // Read message and use it if read was successfull   if (! /* are there more messages left? */)     continue_reading = false; } On Tue, Mar 15, 2011 at 11:48 AM, Henner Zeller henner.zel...@googlemail.com

Re: [protobuf] ProtoBuf and Multi-Threads

2011-03-14 Thread Henner Zeller
On Mon, Mar 14, 2011 at 10:08, ksamdev samvel.khalat...@gmail.com wrote: Hi, I have a large set of files with a number of the same type messages saved. My code reads messages in a sequence from these files one after another. I've measured time (with terminal time command) of running the code,

Re: [protobuf] ProtoBuf and Multi-Threads

2011-03-14 Thread Henner Zeller
On Mon, Mar 14, 2011 at 10:34, ksamdev samvel.khalat...@gmail.com wrote: Thanks for a quick reply. Honestly, I fill a set of histograms for each event. I've added this feature only recently and have a version of the code without histograms. Here is the same performance measurement without

Re: [protobuf] Store number of messages

2011-03-04 Thread Henner Zeller
Varint does an encoding whose length changes with the size of the number - hence the name. So it can use between 1 and 10 bytes. So when the value _events_written changes, re-writing the same number at the beginning of the file will use a different number of bytes. If you want to write a number

Re: [protobuf] field of type timestamp or date with protobuf message

2011-02-12 Thread Henner Zeller
On Sat, Feb 12, 2011 at 09:13, Marco@worldcorp mmistr...@gmail.com wrote: HI all  is it possible to add a field of type timestamp , or date, to a protobuf message.. There is no 'default' way. The reason for that is that protocol buffers are platform independent, and there is no real agreeable

Re: [protobuf] Re: New protobuf feature proposal: Generated classes for streaming / visitors

2011-02-02 Thread Henner Zeller
On Tue, Feb 1, 2011 at 23:02, fpmc f...@google.com wrote: Your proposal has one VisitXXX function for each repeated type.  How does it handle a message with two repeated fields of the same type? I guess the naming is confusing in the example. The Visit is per field-name; but since the typed is

Re: [protobuf] C# client to Java based server

2010-12-28 Thread Henner Zeller
On Tue, Dec 28, 2010 at 15:14, Kenton Varda ken...@google.com wrote: Protocol buffers itself has no built-in RPC implementation.  You have to find an RPC implementation that supports whatever languages you are interested in, or write your own.  It's not too hard to write a simple RPC

Re: [protobuf] image

2010-12-16 Thread Henner Zeller
On Thu, Dec 16, 2010 at 04:11, leo kmukes...@gmail.com wrote: I am planning to use 'Protocol Buffers' in one of my Java ME project which requires server to send catalogs (possibly with images). Can I send images (PNG format) using 'Protocol Buffers'? With the type 'bytes', you can send

Re: [protobuf] fails to parse from string

2010-11-10 Thread Henner Zeller
On Wed, Nov 10, 2010 at 08:23, Brad Lira snmp.apa...@gmail.com wrote: client side: address_book.SerializeToString(mystr) strncpy(buf, mystr.c_str(), strlen(mystr.c_str())); This is an error - you only copy to the first \0 byte (strlen looks for a nul-terminated string) -- however, the string

Re: [protobuf] Swap() on Windows

2010-11-10 Thread Henner Zeller
Is this even a legal transformation that the MS compiler is doing there ? Sounds like a overzealous-optimization compiler bug to me. Did you try to manually remove the 'const' in the generated proto code to see if that would fix it ? On Wed, Nov 10, 2010 at 18:51, Anand Ganesh

Re: [protobuf] Re: Why to reinvent the wheel ?

2010-11-09 Thread Henner Zeller
There are some standards that pack many different ways to put things under one umbrella. This is because they have been decided by committee with many different companies involved that all want to bring in 'their way'. The multitude of ways to encode things with ASN.1 (why there is more than one

Re: [protobuf] Read selective fields without deserializing the entire object?

2010-10-29 Thread Henner Zeller
On Fri, Oct 29, 2010 at 16:13, Ashwin Jayaprakash ashwin.jayaprak...@gmail.com wrote: Is there a way to read selective fields without deserializing the entire object? My serialized message is stored in memory as a (Heap)ByteBuffer. I'm trying to find out if any of the (de-)serialization

Re: [protobuf] including common message definitions across .proto files

2010-10-26 Thread Henner Zeller
On Tue, Oct 26, 2010 at 11:29, Paul mjpabl...@gmail.com wrote: Hi, Suppose I have two files, file1.proto and file2.proto, and I have a message defined in file1 that I want to use in file2.  How would I include the message from file1?  Is there an include statement I would use as in C or C++?

Re: [protobuf] Re: omitting tag numbers

2010-10-25 Thread Henner Zeller
include the field name, then your throw out part of the advantages of protocol buffers out of the window: speed and compact binary encoding. On Oct 22, 6:02 pm, Henner Zeller henner.zel...@googlemail.com wrote: On Fri, Oct 22, 2010 at 15:01, Paul mjpabl...@gmail.com wrote: Hi, This may

Re: [protobuf] Re: omitting tag numbers

2010-10-25 Thread Henner Zeller
On Mon, Oct 25, 2010 at 16:11, Henner Zeller henner.zel...@googlemail.com wrote: On Mon, Oct 25, 2010 at 16:10, maninder batth batth.manin...@gmail.com wrote: I disagree. You could encode field name in the binary. Then at de- serialization, you can read the field descriptor and reconstruct

Re: [protobuf] Possible Memory Leaks

2010-10-25 Thread Henner Zeller
On Mon, Oct 25, 2010 at 17:46, rthompson.dtisoft@gmail.com rthompson.dtisoft@gmail.com wrote: I ran Valgrind on our application and found quite a few possibly lost bytes traces.  Here is an example of one ==1473==    at 0x40263A0: operator new(unsigned int) (vg_replace_malloc.c:214)

Re: [protobuf] protocol buffer within a protocol buffer from C++ to Java

2010-10-25 Thread Henner Zeller
On Mon, Oct 25, 2010 at 18:45, Paul mjpabl...@gmail.com wrote: Hi, I am trying to serialize a protocol buffers message into a string that is contained in another protocol buffer.  I am doing the serialization on the C++ side. // This is the outer protocol buffer message Measurement {  

Re: [protobuf] omitting tag numbers

2010-10-22 Thread Henner Zeller
On Fri, Oct 22, 2010 at 15:01, Paul mjpabl...@gmail.com wrote: Hi, This may seem like a basic question, but I find having to label the .proto file with unique tag numbers for each field a little cumbersome, especially if there are a lot of fields. message Person {  required string name =

Re: [protobuf] Do Protocol Buffers read entire collection of messages into memory from file?

2010-10-19 Thread Henner Zeller
On Tue, Oct 19, 2010 at 06:45, ksamdev ksam...@gmail.com wrote: Hi, I am wondering how do Protocol Buffers read input files? Is the entire file read into memory or some proxy technique is used and entries are read only when required? If you have a sequence of messages you process then you'd

Re: [protobuf] Memory leak detected in protobuf

2010-09-02 Thread Henner Zeller
On Thu, Sep 2, 2010 at 08:03, Jean-Sebastien Stoezel js.stoe...@gmail.com wrote: Hello, I am observing a memory leak after including the protobufs in my project. I would like to investigate whether this leak is due to this library or the use I make of it. I am using the protobufs (latest

Re: [protobuf] Re: Status of protobufs

2010-09-02 Thread Henner Zeller
On Thu, Sep 2, 2010 at 09:59, Jean-Sebastien Stoezel js.stoe...@gmail.com wrote: Hence I'm now using delimiters. But make sure to use length delimiting: length + message. Don't feel tempted to just delimit the message with 'special characters' because of course they might be just part of a

Re: [protobuf] How to set a user defined data within a message

2010-08-19 Thread Henner Zeller
2010/8/19 Julian González julian@gmail.com: I have the following: message Configuration {        required LogInfo logInfo = 1;        required ApmCfg apmCfg = 2;        repeated Rail rail = 3;        required TriggerInfo triggerInfo = 4; } I have an object of type Configuration, but

Re: [protobuf] Re: iSeries port

2010-08-17 Thread Henner Zeller
On Mon, Aug 16, 2010 at 17:04, ury ury.se...@gmail.com wrote: Hi, It was EBCDIC vs. ASCII issues. If anyone is interested in iSeries/zSeries porting issues, or protobuf on EBCDIC, I'll be glad to help In particular if you needed to modify the source and have a patch it might be interesting

Re: [protobuf] Parsing problem using protobuf

2010-08-12 Thread Henner Zeller
On Wed, Aug 11, 2010 at 22:48, anup anup007s...@gmail.com wrote: Hi I am impkementing protobuffers in my Symbian application and during parsing I am sending a file to the proto parser but when I am collecting my attributes its giving garbage values along with the real data. I  dont know what

Re: [protobuf] Re: What's the point of Protocol Buffers?

2010-07-22 Thread Henner Zeller
On Thu, Jul 22, 2010 at 07:50, Tim Acheson tim.ache...@gmail.com wrote: If you can show me a format which offers faster serialisation or deserialisation than JSON in a .NET application, I'd be impressed! :) If the speed and size of JSON serialization is good enough for you, stick with it.

Re: [protobuf] Security Layer to make sure proto objects are not tampered when transferred over https

2010-07-21 Thread Henner Zeller
On Wed, Jul 21, 2010 at 03:32, Prakash Rao prakashrao1...@gmail.com wrote: Is there a way to add security layer to protocol buffer if I'm writing my proto objects to https output stream? In java we have sealed objects and we can have signature attached to it to make sure objects are not

Re: [protobuf] Scalar types

2010-07-21 Thread Henner Zeller
2010/7/21 Julian González julian@gmail.com: Does protocol buffers support an scalar type of one byte or two byte length? lets say an int16, int8? No. But note that integers are 'varint' encoded, so if you only give a small value, it will only eat up a small amount of bits. So a number in

Re: [protobuf] Re: C++ syntax: how to set a singular enum field

2010-07-19 Thread Henner Zeller
On Fri, Jul 16, 2010 at 06:33, Evan Jones ev...@mit.edu wrote: On Jul 16, 2010, at 5:47 , mark.t.macdon...@googlemail.com wrote: if (stabiliser.retraction()==device::HOUSED) coutTrue\n; //but this doesn't compile stabiliser.set_retraction(device::RETRACTED); } See the generated .h file to

Re: [protobuf] Design advice: variability (at runtime) on the number of fields in a message

2010-07-14 Thread Henner Zeller
On Wed, Jul 14, 2010 at 14:19, mark.t.macdon...@googlemail.com mark.t.macdon...@googlemail.com wrote: Let's assume I'm designing a distributed (client-server) application. The server owns a bunch of parameters. The client (GUI) is to be periodically updated when any of their values change. I

Re: [protobuf] hasXxx methods

2010-06-22 Thread Henner Zeller
Hi, 2010/6/22 Miguel Muñoz swingguy1...@yahoo.com: Comrades,   I've been setting a value of a single optional field in a message with many optional fields. In my diagnostic code I'm calling the hasXxx() methods to find out which field is set, but it's telling me they're all set. Is this a bug

Re: [protobuf] Re: question about SerializeToString output for cpp

2010-06-11 Thread Henner Zeller
I have no idea about the hadoop pipes, but wouldn't it be easier to just add an implementation of the pipes to be length delimited instead of trying to mundge the binary data you're sending ? You'd probably loose a lot of speed if you would edit the binary data afterwards. After all, this is what

Re: [protobuf] Message was missing required fields

2010-04-16 Thread Henner Zeller
On Fri, Apr 16, 2010 at 11:05, SyRenity stas.os...@gmail.com wrote: Hi. I'm getting occasionally the following error below in my Java app: com.google.protobuf.InvalidProtocolBufferException: Message was missing required fields.  (Lite runtime could not determine which fields were missing).

Re: [protobuf] Protocol Buf compliation problem (Linux 2.4)

2010-04-13 Thread Henner Zeller
gcc 3.2.3 is a pretty ancient, seven years old compiler. Can't you just install new version ? On Tue, Apr 13, 2010 at 03:38, Nir Belinky belink...@gmail.com wrote: I downloadd protobuf 2.3.0 and tried to compile it on linux 2.4, I receive the following errors: OS: Linux version

Re: [protobuf] Re: compile issue with import statements having path info

2010-04-13 Thread Henner Zeller
On Tue, Apr 13, 2010 at 11:24, CB cn...@verizon.net wrote: Workarounds aside, there is still a bug to be fixed. If you wish to argue that the .proto files or the -I options I passed to proto are invalid, then protoc should have declared an error. If you wish to argue that the .proto files

Re: [protobuf] i am not able to compile the files which includes import statements

2010-04-09 Thread Henner Zeller
On Fri, Apr 9, 2010 at 04:09, prashant waykar waykar.prash...@gmail.com wrote: Hello, can someone please help me out as i am new to PB. i am getting compile errors in the files which consists import statements Thanks in advance You need to be a bit more specific. So if you mention errors, it

Re: [protobuf] Steps for installing the java set of the compiler libraries

2010-03-31 Thread Henner Zeller
On Tue, Mar 30, 2010 at 08:16, Suvojit chanda.c...@gmail.com wrote: can anyone please help me with the set of instructions for installing the protobuf compiler compatible with the java version.I did go through the readme file, but does evrything needs to be done thru commmand line or is there

Re: [protobuf] Re: Serializing nested messages

2010-03-30 Thread Henner Zeller
HI, On Mon, Mar 29, 2010 at 23:20, Nader Salehi nadersale...@gmail.com wrote: On Mar 29, 10:59 pm, Henner Zeller henner.zel...@googlemail.com wrote: On Mon, Mar 29, 2010 at 22:53, Nader Salehi nadersale...@gmail.com wrote: These are valid points, but I need to work within the constraints

Re: [protobuf] Serializing nested messages

2010-03-29 Thread Henner Zeller
On Mon, Mar 29, 2010 at 10:31, Nader Salehi nadersale...@gmail.com wrote: Hi, In my code, I have a PB message which encompass other PB messages. For instance, Protocol Buffer File === message A {  required int32 a = 1; } message B {  required int32 b = 1; } message C {

Re: [protobuf] Re: Serializing nested messages

2010-03-29 Thread Henner Zeller
what your constraints are. -h Nader On Mar 29, 2:41 pm, Henner Zeller henner.zel...@googlemail.com wrote: On Mon, Mar 29, 2010 at 10:31, Nader Salehi nadersale...@gmail.com wrote: Hi, In my code, I have a PB message which encompass other PB messages. For instance, Protocol Buffer

Re: [protobuf] int32 negative numbers

2010-03-21 Thread Henner Zeller
On Sun, Mar 21, 2010 at 08:05, Adam Kwintkiewicz adam.kwintkiew...@gmail.com wrote: ... for a negative number, the resulting varint is always ten bytes long ... Reason for that is the varint encoding: it only encodes the bits that are set in an integer. For small positive values that results in

Re: [protobuf] do the protocol buffer support java generics?

2010-03-19 Thread Henner Zeller
Hi, do the protocol buffer support java generics? if support, how can I define the .proto file ? Not sure what you mean here. Lists for instance you pass to the builder or get from a proto buff object have the type of the content as generic parameter. There are no 'template parameters' for

Re: [protobuf] signing protobuf messages

2010-03-18 Thread Henner Zeller
On Thu, Mar 18, 2010 at 10:36, maxwolf waxm...@gmail.com wrote: I wonder if protobuf messages are safe to be crypto signed? If you just sign the content of a message, then this should be an operation that should not require that a message is generated the same for different implementations,

Re: [protobuf] How to send classes defined in proto over a socket

2010-03-12 Thread Henner Zeller
You're trying to send the raw C++ memory representation of a protocol object send(socket, data_snd, sizeof(data_snd), 0) That doesn't work. And is the reason why protocol buffers are there in the first place: they provide serialization techniques. You need to use the serialization methods that

Re: [protobuf] Re: How to send classes defined in proto over a socket

2010-03-12 Thread Henner Zeller
On Fri, Mar 12, 2010 at 10:20, mk apollo...@gmail.com wrote: Thanks for reply !! Could you please give an example? I tried several ways from this morning but  as I am a new user of protbuf, I don't see what way to follow ... Thanks! Have a look at the documentation, it is full of examples

Re: [protobuf] Re: Please help with serialization/deserialization of classes defined in .proto

2010-03-12 Thread Henner Zeller
Reconsider having a look at your code and ask yourself the following questions - what are the input/output streams connected to. Is it the socket ? - what do you send over the socket ? Is it the data coming from a SerializeTo*() method of the protocol buffer ? Trial and Error programming just

Re: [protobuf] Fudge proto project

2010-02-28 Thread Henner Zeller
On Sun, Feb 28, 2010 at 09:13, Adewale Oshineye adew...@gmail.com wrote: Hi all, Have you seen this: http://www.fudgemsg.org/display/FDG/Fudge+Proto which claims to be compatible with the syntax of protobufs but use different on-disk and on-the-wire representations? Looks like they fell into

Re: [protobuf] Invitation to connect on LinkedIn

2010-02-22 Thread Henner Zeller
of coffee. -h On Mon, Feb 22, 2010 at 4:28 PM, Henner Zeller henner.zel...@googlemail.com wrote: Wow, that elevates protocol buffers to be a real person ;) -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send

Re: [protobuf] Sorting protocol buffer messages.

2010-02-15 Thread Henner Zeller
Some random idea: repeated fields support stl-style iterators; should be possible to use regular std::sort() on it with a custom functor. You probably can hide a lot of code complexity by writing such functors and avoiding runtime complexity by keeping stuff sorted, indeed. On Sun, Feb 14, 2010

Re: [protobuf] PB parsing with empty/reset values

2010-02-05 Thread Henner Zeller
Hi, On Fri, Feb 5, 2010 at 08:43, Hershiv Haria darkmaste...@gmail.com wrote: Hi all, I have an odd issue at the moment. I am sending a PB from an android app to an app engine server, using Java. My app is being used to store files online, and I use the PB to send the file name, destination,

Re: [protobuf] C++ Parsing and de-serialization

2010-01-17 Thread Henner Zeller
Hi, On Sun, Jan 17, 2010 at 13:21, Johan freddielunchb...@gmail.com wrote: Hi, I read data messages that comes in on a TCP/IP socket. These message can be of different types example Person, Project etc, that I have defined and the corresponding .proto files. I can do:    string

Re: [protobuf] How to assign a singel nested object value in C++?

2009-12-29 Thread Henner Zeller
On Tue, Dec 29, 2009 at 11:11, Nigel Pickard pickard.ni...@gmail.com wrote: I'm having a problem working out how to assign a nested object's value in C++ (my Java version works fine).  E.g. in the proto file for my car object I define:  import mycustomengine.proto;  message MyCar {  

Re: [protobuf] Re: protoc plugin compiler extension framework

2009-12-22 Thread Henner Zeller
Hi, On Tue, Dec 22, 2009 at 06:42, Christopher Piggott cpigg...@gmail.com wrote: Hmm maybe I can use the UninterpretedOption message to do this. Would something like this work? message ChrisMessage {  option javadoc = This is an object representing Chris's Message;  repeated int32 field1 = 1

[protobuf] Thinking of implementing: extract documentation in .proto file and store in FileDescriptorProto

2009-12-22 Thread Henner Zeller
Hi, Since this question came up earlier today and I have this anyway on my TODO list, I think this is as well some nice side project for the holidays I could work on ;) Basically, there are two forms of comments typically found for messages and fields: block comments in front of the declaration

Re: [protobuf] Re: Thinking of implementing: extract documentation in .proto file and store in FileDescriptorProto

2009-12-22 Thread Henner Zeller
Hi, On Tue, Dec 22, 2009 at 15:00, Christopher Piggott cpigg...@gmail.com wrote: On Dec 22, 4:53 pm, Henner Zeller henner.zel...@googlemail.com wrote:   /*    * some block comment    */   int32 some_field = 1;   int32 some_other_field = 2;  // short comment. I would be fine

Re: [protobuf] Thinking of implementing: extract documentation in .proto file and store in FileDescriptorProto

2009-12-22 Thread Henner Zeller
.. alright, will spend some time tomorrow implementing things. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to

Re: [protobuf] Re: Java -using GPB -which type of stream should I be using over sockets?

2009-12-02 Thread Henner Zeller
On Wed, Dec 2, 2009 at 12:31, Nigel Pickard pickard.ni...@gmail.com wrote: Jason -do you mean any Java output stream type will work (as all Java IO stream types ultimately use bytes), and that the byte stream produced will have the bytes put in an accepted standard order by the writeTo method?

Re: [protobuf] Re: Java -using GPB -which type of stream should I be using over sockets?

2009-12-02 Thread Henner Zeller
Are your ObjectOutputStreams transparent ? Or do they prepend/append things to the data ? On Wed, Dec 2, 2009 at 13:11, Nigel Pickard pickard.ni...@gmail.com wrote: Oh, wait So I have a test Java app where one thread is running as a server, one as a client. I've been sending a GPB defined

Re: [protobuf] Re: Java -using GPB -which type of stream should I be using over sockets?

2009-12-02 Thread Henner Zeller
changed has been the input stream type on the client. Basically, on the client side I called the GPB object's parseFrom method with the DataInputStream.as an argument and expected it to work but got that error message. On Dec 2, 4:17 pm, Henner Zeller henner.zel...@googlemail.com wrote

  1   2   >