Re: Message forwarding and partial parsing

2009-10-08 Thread villintehaspam
Hi Kenton, Thank you for your quick response and your feedback. I'm going to use option 3, since as you say this will probably be the fastest solution and I think that it will fit in the best with our application. You are probably right that this will not be an issue for most messages that are

Generating.proto files from java source file

2009-10-08 Thread grasshopper
Hi all, a guy that isn't working in my company anymore has defined some protocol buffer messages that we still use. We need to extend these messages now, but we don't have the .proto file. Is there a straight way to generate the proto files from the java classes? How could I do this? Thanks

arrays??

2009-10-08 Thread sergei175
Hi, I've looked at protocol buffers, and I've noted that there is no support for arrays of values (double, integers). This is a significant drawback, for example JSOM, HDF5 etc they all have this. One post suggested that one should put an array as one single string in a field I've did

Re: arrays??

2009-10-08 Thread Constantinos Michael
On Thu, Oct 8, 2009 at 5:35 PM, sergei175 sergei...@googlemail.com wrote: Hi, I've looked at protocol buffers, and I've noted that there is no support for arrays of values (double, integers). This is a significant drawback, for example JSOM, HDF5 etc they all have this. Have you

Re: arrays??

2009-10-08 Thread sergei175
Hi, This is exactly what I've done before putting arrays into a string. When I've implemented arrays via repeated fields, the program was even slower, and the file size was too large (compare to Java serialization mechanism+ zip). This is why I've moved my array into a string, thinking

Re: arrays??

2009-10-08 Thread Henner Zeller
Hi,  This is exactly what I've done before putting arrays into a string.  When I've implemented arrays via repeated fields, the program was even slower,  and the file size was too large (compare to Java serialization mechanism+ zip). If you put the values in a string and do you own array

Re: arrays??

2009-10-08 Thread sergei175
Ok, this is a simple example of proto buffers file. I want to write 1000 Records. Each record has its name and NamedArray Each array has its name and a set of double numbers, For my example, I've filled array with 10 000 numbers for all 1000 Records. There are 2 things you will see: 1)

Re: arrays??

2009-10-08 Thread Henner Zeller
Hi, On Thu, Oct 8, 2009 at 10:57, sergei175 sergei...@googlemail.com wrote:  Ok, this is a simple example of proto buffers file.  I want to write 1000 Records. Each record has its name and NamedArray  Each array has its name and a set of double numbers,  For my example,  I've filled array

Re: arrays??

2009-10-08 Thread Kenton Varda
On Thu, Oct 8, 2009 at 10:57 AM, sergei175 sergei...@googlemail.com wrote: 1) After event 500, even 200MB memory is not enough. 2) It's slower by factor ~5 compare to the java serialization with the compression. Protocol Buffers do not include compression, so to make this comparison

Re: Generating.proto files from java source file

2009-10-08 Thread Kenton Varda
Yikes. That's kind of like someone left you with just .class files without the .java files. If you look at the code, though, you will notice that there are comments in it defining each field, like: // optional int32 i = 1; These should be the exact field definitions as they might appear in the

Re: Generating.proto files from java source file

2009-10-08 Thread Henner Zeller
On Thu, Oct 8, 2009 at 11:32, Kenton Varda ken...@google.com wrote: Yikes.  That's kind of like someone left you with just .class files without the .java files. If you look at the code, though, you will notice that there are comments in it defining each field, like:   // optional int32 i =

Re: Generating.proto files from java source file

2009-10-08 Thread Kenton Varda
Hmm, that's true. Although I'm not sure if there's actual code for writing the .proto file in Java. In C++, descriptors have a DebugString() method which returns a compilable .proto file. On Thu, Oct 8, 2009 at 11:41 AM, Henner Zeller h.zel...@acm.org wrote: On Thu, Oct 8, 2009 at 11:32,

Compile error: must implement the inherited abstract method

2009-10-08 Thread TD
Hi, I've just downloaded and build a fresh Protocol Buffer package. I'm planning to use the Java version. I've added protoc to my path and compiled two .proto files successfully. I've created an eclipse project, and added the protobuf-java-2.2.0.jar file to the path. The two generated a

Re: arrays??

2009-10-08 Thread sergei175
Thanks, I've started to understand this better. Indeed, I have to implement my own approach for I/O - protobuf alone is not enough. I only worry that my own I/O to read/write records will not be cross platform, so I could not benefit from the strength of this package. On Oct 8, 1:24 pm,