Thrift
  1. Thrift
  2. THRIFT-251

Omniprotocol to have multi protocol over single services

    Details

    • Type: New Feature New Feature
    • Status: Reopened
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: C++ - Library
    • Labels:
      None

      Description

      Inspired by the thrift like framework we have in the company i work for, i think it would be really cool to have an omniprotocol that would recognize and dispatch to real underlying protocols the current message. This would allow having a single service able to process request from other services in an efficient binary protocol, but also serve queries coming over AJAX from the browser via HTTP POST + JSON.

      The output protocol will be the input one to get things easier, even if having an output parameter in the URI (in case of HTTP request) could be possible in the future.

      We have all the basics to get this feature running, the JSON protocol is fixed (THRIFT-244) and the THttpServer transport now exists for the C++ library (THRIFT-247)

        Issue Links

          Activity

          Hide
          Michael Greene added a comment -

          See https://issues.apache.org/jira/browse/THRIFT-66 for a related, but different, idea that hasn't gained much traction so far because of its broader scope.

          Show
          Michael Greene added a comment - See https://issues.apache.org/jira/browse/THRIFT-66 for a related, but different, idea that hasn't gained much traction so far because of its broader scope.
          Hide
          Jérémie BORDIER added a comment -

          Thanks for the link Michael. This is related but different yeah, but not incompatible. Actually, this is how our framework works, services have a name and are reachable over HTTP with /ServiceName/Method URIs... I'll get things done step by step, but I'll keep a track about it in my fun things to do list.

          Show
          Jérémie BORDIER added a comment - Thanks for the link Michael. This is related but different yeah, but not incompatible. Actually, this is how our framework works, services have a name and are reachable over HTTP with /ServiceName/Method URIs... I'll get things done step by step, but I'll keep a track about it in my fun things to do list.
          Hide
          T Jake Luciani added a comment -

          I've also been thinking of a similar protocol.

          I'm all for it. The question is can you efficiently and reliably peek and detect the originating protocol.

          Also, what languages are you looking to support for this patch (c++ I assume)?

          Show
          T Jake Luciani added a comment - I've also been thinking of a similar protocol. I'm all for it. The question is can you efficiently and reliably peek and detect the originating protocol. Also, what languages are you looking to support for this patch (c++ I assume)?
          Hide
          Jérémie BORDIER added a comment -

          Detecting the protocol should be quite straightforward since i'll support only the most used protocols (Binary, JSON, and hopefully Compact when a C++ version will be available) and they are totally different from the first byte (well, for binary / compact, i'm not sure because i didn't looked to bryan's implementation yet, so i think that it will be very efficient, only a few bytes to recognize the protocol and then transparent proxying, and reliable.

          I'll start by the C++ Library implementation in a few days. When it will be rock solid, i'll be able to help other language developpers as far i as can, so Python, Ruby and Java in priority.

          Show
          Jérémie BORDIER added a comment - Detecting the protocol should be quite straightforward since i'll support only the most used protocols (Binary, JSON, and hopefully Compact when a C++ version will be available) and they are totally different from the first byte (well, for binary / compact, i'm not sure because i didn't looked to bryan's implementation yet, so i think that it will be very efficient, only a few bytes to recognize the protocol and then transparent proxying, and reliable. I'll start by the C++ Library implementation in a few days. When it will be rock solid, i'll be able to help other language developpers as far i as can, so Python, Ruby and Java in priority.
          Hide
          Roger Meier added a comment -

          Java Implementation => guessProtocolFactory

          Show
          Roger Meier added a comment - Java Implementation => guessProtocolFactory

            People

            • Assignee:
              Unassigned
              Reporter:
              Jérémie BORDIER
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development