Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-320

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • None
    • None
    • Wish List
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bryanduxbury Bryan Duxbury
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: