Thanks Kenton,

My problem is not how do do it, but how to do it efficiently. If I
have a large number of messages arranged in a sorted order and wish to
search the messages, this means each time I want to do a comparison, I
would have to de-serialize the whole message, and use the reflection
message. If I have been carful to lay out my fields in precedence
order, then this would be quiet slow compared examining field by filed
in the stream with zero object creation. Particularly if the
comparison involves many fields and the first field i usually
different. To explain better what I mean take a look at the feature in
Arvo.

http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/io/BinaryData.java?view=markup

I'm surprised this issue has not come up?

On Oct 19, 6:13 am, Kenton Varda <[email protected]> wrote:
> You can implement arbitrary comparison algorithms using reflection (protobuf
> reflection, not Java reflection -- see the Message interface).
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to