[ 
https://issues.apache.org/jira/browse/THRIFT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623092#action_12623092
 ] 

Chad Walters commented on THRIFT-110:
-------------------------------------

Take a look at the DenseProtocol 
(http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TDenseProtocol.h?view=log).
 It's only really been worked on for C++ so far -- adding a Java version would 
be good but you might want to check around to see whether the protocol is 
really complete at this point (dreiss?).

At one point we talked about a family of more compact protocols that allow for 
the type information to be passed out of band, resulting in even greater 
savings. So far it hasn't been a high priority but It's definitely something 
I'd love to see.

I'd also like to see the IDL extended so that hints can be provided for 
compactness -- such as "small" or "small unsigned" or "hash" -- which the 
protocol implementation is free to ignore if need be. FWIW, the DenseProtocol 
as it is currently implemented is very bad for negative numbers.

> 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.

Reply via email to