Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Thrift Wiki" for change 
notification.

The following page has been changed by johanoskarsson:
http://wiki.apache.org/thrift/New_compact_binary_protocol

------------------------------------------------------------------------------
  == Description ==
- There's been numerous discussion on how to implement a new more compact 
binary protocol. The discussions become hard to follow after a while so this 
page is intended to be used as an easy to use summary that can later be 
formalized into different options and finally become a specification. Help 
needed to fill this page with further details, suggestions and pros/cons for 
each suggestiong.
+ There's been numerous discussion on how to implement a new more compact 
binary protocol. The discussions become hard to follow after a while so this 
page is intended to be used as an easy to use summary that can later be 
formalized into different options and finally become a specification. Help 
needed to fill this page with further details, suggestions and pros/cons for 
each suggestion.
  
  == Implementation suggestions ==
  === Encode i16, i32 and i64 types saved as variable size integers ===
  ||Suggestion||Pros||Cons||
- ||Base 128 + zigzag, borrow from protocol buffers?|| ||user has to specify 
whether zigzag needs to be used for efficiency||
+ ||Base 128 + zigzag, borrow from protocol buffers?|| ||User has to specify 
whether zigzag needs to be used for efficiency||
  ''Is this suggestion about variable encoding of all ints, or just specified 
ones?''
  
  === Remove / reduce the size of field prefix tags ===
  ||Suggestion||Pros||Cons||
- ||Reduce from 3 bytes per field to 1 byte, see 
[http://publists.facebook.com/pipermail/thrift/2008-January/000275.html mail] 
(retains versioning support)|| || * only good for dense structs * breaks down 
if type modifiers/hints need to go into type field||
+ ||Reduce from 3 bytes per field to 1 byte, see 
[http://publists.facebook.com/pipermail/thrift/2008-January/000275.html 
mail]||Retains versioning support||Only good for dense structs[[BR]]Breaks down 
if type modifiers/hints need to go into type field||
  ||1-byte type-and-modifier, variable length int for field id|| || ||
- ||Drop field prefix altogether||||||
+ ||Drop field prefix altogether||saves tons of space||||
  
  === Type changes ===
  ||Suggestion||Pros||Cons||
- ||Unsigned integers||would alleviate need for separate zigzag type||unsigned 
ints don't exist in all languages||
+ ||Unsigned integers||Would alleviate need for separate zigzag type||Unsigned 
ints don't exist in all languages||
  ||Type annotations||Allows us to specify encoding details about the 
fields/types that the protocols may or may not use||||
- ||Variable ints for string, binary, and collection sizes||will often shrink 
to one or two bytes|| ||
+ ||Variable ints for string, binary, and collection sizes||Will often shrink 
to one or two bytes|| ||
  
  == Information sources ==
  [http://publists.facebook.com/pipermail/thrift/2008-January/000275.html 2008 
jan mail thread][[BR]]

Reply via email to