[
https://issues.apache.org/jira/browse/TINKERPOP-1240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15212118#comment-15212118
]
Daniel Kuppitz commented on TINKERPOP-1240:
-------------------------------------------
Hm, the old script step in TP2 was one of the most used steps in OLAP. We
should reserve {{script()}} for a reimplementation of the old step.
The step described here looks more like an {{eval()}} step.
> 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.4#6332)