Thrift Protocol Structure Mark Slee (mcslee@facebook.com) Last Modified: 2007-Jun-29 Thrift is distributed under the Thrift open source software license. Please see the included LICENSE file. -------------------------------------------------------------------- This document describes the structure of the Thrift protocol without specifying the encoding. Thus, the order of elements could in some cases be rearranged depending upon the TProtocol implementation, but this document specifies the minimum required structure. There are some "dumb" terminals like STRING and INT that take the place of an actual encoding specification. They key point to notice is that ALL messages are just one wrapped . Depending upon the message type, the can be interpreted as the argument list to a function, the return value of a function, or an exception. -------------------------------------------------------------------- ::= ::= ::= STRING ::= T_CALL | T_REPLY | T_EXCEPTION ::= I32 ::= * ::= ::= STRING ::= T_STOP ::= ::= ::= STRING ::= T_BOOL | T_BYTE | T_I8 | T_I16 | T_I32 | T_I64 | T_DOUBLE | T_STRING | T_STRUCT | T_MAP | T_SET | T_LIST ::= I16 ::= I8 | I16 | I32 | I64 | DOUBLE | STRING | | | | ::= * ::= ::= ::= ::= I32 ::= * ::= ::= ::= I32 ::= * ::= ::= ::= I32