[
https://issues.apache.org/jira/browse/THRIFT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623143#action_12623143
]
Chad Walters commented on THRIFT-110:
-------------------------------------
I am glad that there is interest in this topic and I would be happy to talk
further on how to make progress in this area.
bq. Our own protocol is extremely compact . I am looking for a true cross
language library so that all our users can take advantage of that. Thrift has
the potential but it is very inefficient compared to protocol buffers.
I would very much like to see Thrift become the defacto protocol system used by
other Apache projects and beyond. Part of the current lack of compactness is
due to Thrift's heritage as a fast RPC system but there are definite thoughts
on several different protocol implementations that would address compactness.
bq.This first step is to add 'unsigned' .
I agree, although I'd point out that the DenseProtocol kind of assumes unsigned
already.
bq.Other problem is with the list/map types . They are expected to be
homogenous which is not acceptable (I guess so).
I am not sure this is going to change. In C++, lists are implemented as vectors
of objects, not object references. Can you provide some concrete cases where
this has been an absolute requirement?
bq.Writing a string with length (i32) first consumes four bytes. Which is
inefficient for small strings .
Defintely. The DenseProtocol already does this and any compact protocol would
want to follow suit.
bq. We have a special type called extern string . It stores the strings already
written and assign an index to it .
Sounds interesting. This generally wouldn't be that interesting for small RPC
messages but I can see other use cases where it would be.
When I was talking about adding a "hash" hint, this was to indicate that an
integer type was unlikely to benefit at all from a variable-length encoding --
eg: a value coming from a portion of an MD5 or the like.
> A more compact format
> ----------------------
>
> Key: THRIFT-110
> URL: https://issues.apache.org/jira/browse/THRIFT-110
> Project: Thrift
> Issue Type: Improvement
> Reporter: Noble Paul
>
> Thrift is not very compact in writing out data as (say protobuf) . It does
> not have the concept of variable length integers and various other
> optimizations possible . In Solr we use a lot of such optimizations to make a
> very compact payload. Thrift has a lot common with that format.
> It is all done in a single class
> http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/common/util/NamedListCodec.java?revision=685640&view=markup
> The other optimizations include writing type/value in same byte, very fast
> writes of Strings, externalizable strings etc
> We could use a thrift format for non-java clients and I would like to see it
> as compact as the current java version
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.