[ 
https://issues.apache.org/jira/browse/TINKERPOP-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

stephen mallette closed TINKERPOP-1486.
---------------------------------------
       Resolution: Done
    Fix Version/s: 3.2.3

There was some discussion on the mailing list a while back during development 
of these APIs that basically talked about re-use of existing naming and API 
concepts and not creating "new things". I think this is one of those situations 
as your suggestions would almost takes us back to what we originally had for 
these APIs. 

Anyway, I agree that it could be confusing for an implementer to figure out 
what to do, so I added more javadocs/comments and made the subject of the 
problem {{nextTraverser()}} an abstract method so that implementers know to 
deal with that method specifically.

Implemented here via CTR: 
https://github.com/apache/tinkerpop/commit/d43d4e01a3299f9031a2b1ac38790e67f1fe01cb

> Improve API of RemoteConnection
> -------------------------------
>
>                 Key: TINKERPOP-1486
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1486
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: language-variant, process
>    Affects Versions: 3.2.2
>            Reporter: Kevin Gallardo
>            Assignee: stephen mallette
>             Fix For: 3.2.3
>
>
> 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to