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 2016/08/12 20:04:20 UTC

[jira] [Closed] (TINKERPOP-1145) TraversalSource.script() as a general-solution to :>

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

stephen mallette closed TINKERPOP-1145.
---------------------------------------
    Resolution: Won't Fix
      Assignee: stephen mallette

The work we have in TINKERPOP-1278 is a better approach to this problem. 

> TraversalSource.script() as a general-solution to :>
> ----------------------------------------------------
>
>                 Key: TINKERPOP-1145
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1145
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.1.0-incubating, 3.1.1-incubating
>            Reporter: Marko A. Rodriguez
>            Assignee: stephen mallette
>
> In {{GraphComputer}}, if the traversal uses a lambda, the user has to use a "remote connection" and submit their traversal as a script-engine {{String}} via:
> {code}
> gremlin> :> g.V().group().by{it.name[0]} 
> {code}
> For Gremlin Server, {{:>}} is currently the only way to submit traversals in the Gremlin Console.
> This is all bad. Why? Its Gremlin Console specific and we can solve it more elegantly with the work in TINKERPOP-971 and TINKERPOP-575.
> {code}
> g = graph.traversal().withComputer()
> g.V().group().by("name") // CURRENT AND GOOD
> {code}
> {code}
> g = graph.traversal().withComputer()
> g.script("g.V().group().by{it.name[0]}") // PROPOSED
> {code}
> {code}
> g = graph.traversal().withServer('127.0.0.1:8080')
> g.script("g.V().group().by{it.name[0]}") // PROPOSED
> {code}
> See {{TraversalScriptFunction}} for some pieces of the implementation.
> We could then make {{:>}} simply be shorthand for {{g.script()}}. However, outside the console, {{g.script()}} just works.
> Next, we can assume {{gremlin-groovy}}, but we could also allow:
> {code}
> g = graph.traversal().withServer('127.0.0.1:8080').withStrategies(ScriptEngineStrategy.for("gremlin-scala"))
> g.script("g.V().group().by(??)") // PROPOSED
> {code}



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