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

Noble Paul commented on THRIFT-110:
-----------------------------------

bq.String externalization is supported on RPC calls, but not direct 
serialization.

Why not? 
extern strings can be an explicit declaration by user because he knows what is 
possibly repeated

bq. Wherever possible, use the 4 MSB in the type field as a modifier to store 
type-specific info.
if possible try out the approach I said of using 5 and 3 bits combo . If we 
have 5 bits we can store values upto 31 as opposed to values upto 15 for 4 
bits. we use it and found to be useful

bq.Autogenerated negative field ids will be represented poorly as varints

We must *disallow* negative field ids . There is no possible use for that

writing out id as an integer/varint is not very efficient as opposed to using a 
variable length bitset to say which field is present and which field is not.

bq.Doubles can possibly be varint compressed as well... need to do more research
the advantage can be minimal and it is better left out. let us write out double 
as double

> A more compact format 
> ----------------------
>
>                 Key: THRIFT-110
>                 URL: https://issues.apache.org/jira/browse/THRIFT-110
>             Project: Thrift
>          Issue Type: Improvement
>            Reporter: Noble Paul
>         Attachments: compact_proto_spec.txt
>
>
> 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