Common base protocols for "text" and "binary" protocols
-------------------------------------------------------

                 Key: THRIFT-320
                 URL: https://issues.apache.org/jira/browse/THRIFT-320
             Project: Thrift
          Issue Type: Improvement
            Reporter: Bryan Duxbury
            Priority: Trivial


I was thinking that it would be useful to organize our protocols a little bit. 
What we have today are "text" protocols like the JSON protocol, and "binary" 
protocols like TBinary, TDense, and TCompact. What we could do is make two new 
abstract protocols, TTextProtocol and TBaseBinaryProtocol, and then inherit 
protocols from these two appropriately.

Text protocols really would only be organizational, at least from my current 
understanding. Binary protocols, however, can have at least one interesting 
piece of shared functionality: a 1-byte leading protocol identifier in 
messages. The primary use of this is to make sure that non-framed binary 
messages can't be mistaken for framed ones by always making it a negative 
number. Another benefit of using a protocol identifier is that you could make 
an auto-negotiating binary protocol implementation. 

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