You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "stephen mallette (JIRA)" <ji...@apache.org> on 2017/03/28 14:25:41 UTC

[jira] [Commented] (TINKERPOP-1240) Provide support g.script("V().map{closure}")

    [ https://issues.apache.org/jira/browse/TINKERPOP-1240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15945262#comment-15945262 ] 

stephen mallette commented on TINKERPOP-1240:
---------------------------------------------

Another important point on this one is that it allows us to downplay direct usage of the drivers to submit scripts and further enforce use of the traversal API for all such things.

> Provide support g.script("V().map{closure}")
> --------------------------------------------
>
>                 Key: TINKERPOP-1240
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1240
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.1.1-incubating
>            Reporter: Marko A. Rodriguez
>
> We have lots in place for remoting traversals -- {{RemoteStep}} and {{TraversalVertexProgramStep}}. I think the final piece to this puzzle is sending closure-based traversals. I believe we should add:
> {code}
> g.V().out().script("map{it.bulk()}").sum()
> {code}
> I think this would direct compile to:
> {code}
> [GraphStep,VertexStep,ScriptStep,SumStep]
> {code}
> What happens is that this gets fully compiled remotely for both {{RemoteGraph}} and {{GraphComputer}}. When a full compilation happens, it will look like:
> {code}
> [GraphStep,VertexStep,MapStep,SumStep]
> {code} 
> There will exist {{ScriptStrategy}} that will do this:
> * Can be defined by {{g.withStrategy(ScriptStrategy.build().engine("gremlin-groovy").create())}}.
> * Will find all {{ScriptSteps}}, evaluate their {{ScriptTraversal}} and then insert their steps into the master {{Traversal}}.
> Thats it.
> This also allows people to go so far as:
> {code}
> g.script("V().out().map{..}.in().blah()"}
> {code}
> If they don't want to move between....
> This would allow us to completely deprecate {{:>}} for both {{GremlinServer}} and {{HadoopRemoteAcceptor}}... which I believe are the only places they are used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)