Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2249

Improve RequestOption passing

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.4.2
    • None
    • driver, server
    • None

    Description

      RequestOptions provides a way to set certain control arguments to send to the server like a per-request timeout or batch size. For bytecode traversals, these are set somewhat statically and selectively by way of with() which are then gathered by DriverRemoteConnection into a RequestOptions object and then sent to the server on the request - it's basically leading to a giant switch statement as new special options are being added.

      Perhaps we should also consider a "request headers" space on the RequestMessage rather than just throwing all these options in at the "args" level.

      Another idea might be to do with(TraversalSourceOptions) where TraversalSourceOptions would be a new interface that something like RequestOptions could implement. That way we could pass around RequestOptions in a consistent way:

      submit("g.V()", RequestOptions.build().timeout(100).create())
      g.with(RequestOptions.build().timeout(100).create()).V()
      

      rather than:

      g.with("evaluationTimeout", 100)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              spmallette Stephen Mallette
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: