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

stephen mallette reassigned TINKERPOP-2024:
-------------------------------------------

    Assignee: stephen mallette

> Gremlin Server Application archetype should connect via withRemote
> ------------------------------------------------------------------
>
>                 Key: TINKERPOP-2024
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2024
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: documentation, server
>    Affects Versions: 3.2.9
>            Reporter: Florian Hockmann
>            Assignee: stephen mallette
>            Priority: Minor
>
> We seem to have established consensus that Gremlin Bytecode is the preferred 
> way to execute Gremlin traversals instead of sending traversals as scripts to 
> the server for execution. The Gremlin Server Application Maven archetype 
> however still only uses the script variant:
> {code:java}
> public List<String> findCreatorsOfSoftware(String softwareName) throws 
> Exception {
>     // it is very important from a performance perspective to parameterize 
> queries
>     Map params = new HashMap();
>     params.put("n", softwareName);
>     return 
> client.submit("g.V().hasLabel('software').has('name',n).in('created').values('name')",
>  params)
>         .all().get().stream().map(r ->
>             r.getString()).collect(Collectors.toList());
> }
> {code}
> Since new users can use this archetype to get started with Gremlin, we should 
> encourage best practices and therefore connect via {{withRemote}} to send the 
> traversal as Bytecode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to