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

RemoteConnection needs to provide TraversalSideEffects.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Done
    • 3.2.0-incubating
    • 3.2.2
    • driver, process, server

    Description

      Right now the RemoteConnection API is this:

      public <E> Iterator<Traverser.Admin<E>> submit(final Traversal<?, E> traversal) throws RemoteConnectionException;
      

      This is bad because a result set is not just an iterator of traversers, it is also the sideEffects. I just hit a big snag in gremlin-variants when not using TinkerGraph and thus, not everything in the same JVM.

      I think we should do one of two things:

      public <E> Traversal<?,E> submit(final Traversal<?, E> traversal) throws RemoteConnectionException;
      

      In essence, a traversal goes out an then a traversal comes back and that traversal has an end step iterator of traversers as well as traversal side-effects. Moreover, that returned Traversal could be like RemoteTraversal and when getSideEffects() is called, the sideEffects are lazily fetched ....

      We will have the same problem when we extend RemoteConnection with:

      public <E> Iterator<Traverser.Admin<E>> submit(final String alias, final String scriptEngine, final String traversalScript, Object... bindings) throws RemoteConnectionException;
      

      I sort of like the concept of RemoteTraversal as it allows us to not only getSideEffects(), but also toString(), etc. A remote traversal can offer more control than just Iterator.

      cc/ spmallette

      Attachments

        Issue Links

          Activity

            People

              spmallette Stephen Mallette
              okram Marko A. Rodriguez
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: