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

Towards a more consistent FileTransport naming scheme

    XMLWordPrintableJSON

Details

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

    Description

      I just did some research across the /lib folder too find out, what kinds of file transports are supported by the various languages. This is what I found:

      Cocoa

      • TNSFileHandleTransport

      C++

      • TFileTransport
      • TSimpleFileTransport
      • TPipedFileReaderTransport

      D

      • TFileReaderTransport / TFileWriterTransport

      Erlang

      • thrift_disk_log_transport.erl

      Java

      • TFileTransport
      • TSimpleFileTransport

      Python

      • TFileObjectTransport

      Obviously, we have a somewhat inconsistent naming scheme. Next, the difference between a TFileTransport and a TSimpleFileTransport is not deductable by the name, and it is not intuitively clear what transport to use in which case without looking at the implementation of both transports.

      If we stick with Java as an example, TSimpleFileTransport just means, that this is the real file transport, while the TFileTransport should be called TFramedChunkedFileTransport, because that's what it is.

      Once we found a good naming scheme, all other file transports should be named after that scheme, as appropriate. This makes it more easy to the Thrift user and prevents errors due to incompatible transports caused by bad names (THRIFT-2582).

      I'd like to hear your opinions.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jensg Jens Geyer
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: