[
https://issues.apache.org/jira/browse/TINKERPOP-1240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15211958#comment-15211958
]
stephen mallette commented on TINKERPOP-1240:
---------------------------------------------
I think the {{ScriptStrategy}} is really smart and as it turns out necessary as
we'll need to specify the {{engine()}} perhaps more directly than just
"gremlin-groovy". We might need to supply a specific {{ScriptEngine}} or
{{GremlinExecutor}} as they have specific initializations that might be
necessary to execute the supplied script. Not sure of what's required at this
second - that needs some more analysis/thought.
> 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)