[protobuf] Re: Java: how to use protobuf to send messages quickly over sockets?

2009-10-29 Thread jta23
Thanks for the info. I thought the Java serialization metadata would have been large compared to the relevant data, but I guess not! On Oct 29, 5:42 pm, Kenton Varda wrote: > It sounds plausible.  There's no fundamental reason why protocol buffers > should be faster than Java serialization, at l

[protobuf] Re: Java: how to use protobuf to send messages quickly over sockets?

2009-10-29 Thread Kenton Varda
It sounds plausible. There's no fundamental reason why protocol buffers should be faster than Java serialization, at least for simple objects like yours composed of a set of primitive values. Since Java serialization is implemented by the VM, it can probably optimize better than protobufs can. H

[protobuf] Java: how to use protobuf to send messages quickly over sockets?

2009-10-29 Thread jta23
I'm looking to get sense if my experience sounds reasonable or if it sounds like I'm doing something very wrong, any insight appreciated! I have a Serializable Java object containing: 4 integers 3 bytes 2 Strings 1 short 1 double I have a vector of about 10M objects I am sending from a server t

[protobuf] Re: How to create attributes for a element in proto file

2009-10-29 Thread Kenton Varda
On Thu, Oct 29, 2009 at 10:05 AM, Makulik wrote: > Don't know if this is realized as an intrinsic protobuf language > feature. > No, it's not. Protocol Buffers are completely independent of XML. However, you could write an XML<->Protobuf converter by taking advantage of protobuf reflection. --

[protobuf] Re: why protobuf optional field does not take null

2009-10-29 Thread Kenton Varda
Protocol buffers has no concept of null. Fields cannot be set to null. You can *clear* a field, like: builder.clearParamCountry(); This sets the field back to its default value (the empty string, unless you declared some other default). Also, hasParamCountry() will return false until you set

[protobuf] Re: Protocol Buf Compliation Problem

2009-10-29 Thread Kenton Varda
I would guess that the GCC version is the problem. If you can find a work-around, submit a patch! On Thu, Oct 29, 2009 at 1:32 AM, eggxp wrote: > > OS & Version: > [r...@localhost root]# cat /proc/version > Linux version 2.4.20-8smp (bhcomp...@porky.devel.redhat.com) (gcc > version 3.2.2 > 20

[protobuf] Re: How to create attributes for a element in proto file

2009-10-29 Thread Makulik
Hi, There was a recent post in this group saying that you can specify additional keywords in your protobuf message definition to steer XML de-/ serialization. http://groups.google.com/group/protobuf/browse_thread/thread/2c1617a2ff4a22d7/5239dea7bee2d653?lnk=gst&q=ATTRIBUTE#5239dea7bee2d653 Don'

[protobuf] why protobuf optional field does not take null

2009-10-29 Thread micha
Hi, I have a message with a optionl field. * optional string param_country = 6; I would like to avoid the to check each attribute if its null or not, before setting it to the message. In the net i found some code fragment of protobuf, that looked to me that setting this field to null * .set

[protobuf] How to create attributes for a element in proto file

2009-10-29 Thread chinna
Hi, could any one help me on how to create attributes for a element in proto file. my sample xml file is like below.. 2294559 1674 1674 qqm87msaz0 - ti=(motor and device) gbapps pn,pd,ti 0 20 i want to create proto file for the above..please help me. Thanks in advance. regards, chinna.

[protobuf] Protocol Buf Compliation Problem

2009-10-29 Thread eggxp
OS & Version: [r...@localhost root]# cat /proc/version Linux version 2.4.20-8smp (bhcomp...@porky.devel.redhat.com) (gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #1 SMP Thu Mar 13 17:45:54 EST 2003 File: protobuf-2.2.0.tar.gz gcc version : [r...@localhost root]# gcc -v Reading specs fr