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

Improve API of RemoteConnection

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.2
    • Fix Version/s: 3.2.3
    • Component/s: process
    • Labels:
      None

      Description

      Currently an implementor that wants to define a RemoteConnection implementation must return a RemoteTraversal object from the RemoteConnection#submit(Bytecode) method.

      Thus it needs to implement a specific RemoteTraversal class. When implementing a RemoteTraversal we need to implement the methods next() and hasNext(). However these methods never seem to get called. Moreover, we need to implement the method nextTraverser() which is the one that is actually going to get called, but the method is not abstract and it is not natural to understand that this particular method needs to be implemented.

      It seems like all the other methods of RemoteTraversal are never called as well since it is only used in RemoteStep, which only calls nextTraverser(). I wonder if we could stop using the RemoteTraversal and instead have the submit() method return a simple abstract class that has:

      • abstract method nextTraverser() returns Traverser
      • abstract method getSideEffects() returns SideEffects
      • possibly extend it later with others

        Attachments

          Activity

            People

            • Assignee:
              spmallette Stephen Mallette
              Reporter:
              newkek Kevin Gallardo
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: