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

Add support for idempotent service requests

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Wish List
    • None
    • NA

    Description

      I would like to be able to flag service methods as idempotent and allow the transport to replay idempotent requests in certain failure cases. I think this would be a valuable feature for Thrift and its community of users.

      High-Level Feature Description:

      Owners of services should be able to flag a service method as idempotent in the IDL. This metadata will need to make its way into the code generated by the compiler. Exactly how that shows up is probably language dependent.

      The transport can then transparently replay the idempotent requests for typical errors, such as connect timeout, interrupted connections, no response received in timeout interval, etc.

      The replaying of idempotent requests can be disabled/enabled via the transport. In addition to enabling/disabling, the configuration could allow for the number of allowed retries to be specified or even provide a delegate method that decides if the retry is allowed based on the error that occurred and other context.

      In some cases retries are not desired, even if the method allows for it. In this case the caller can simply disable retries. Likewise, the caller can decide to only retry on a subset of the possible errors by providing a delegate to the transport.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tkinnis Tony Kinnis
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: