You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/08/13 14:32:00 UTC
[jira] [Commented] (TINKERPOP-2024) Gremlin Server Application
archetype should connect via withRemote
[ https://issues.apache.org/jira/browse/TINKERPOP-2024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16578341#comment-16578341 ]
ASF GitHub Bot commented on TINKERPOP-2024:
-------------------------------------------
GitHub user spmallette opened a pull request:
https://github.com/apache/tinkerpop/pull/911
TINKERPOP-2024 Make server archetype use remote traversal
https://issues.apache.org/jira/browse/TINKERPOP-2024
Since we're promoting remote traversals over scripts it would be better for the archetype to use them.
Builds with `mvn clean install`
VOTE +1
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-2024
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/911.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #911
----
commit 1a3549f7232ebe65cbba158c1442a567bc2dc695
Author: Stephen Mallette <sp...@...>
Date: 2018-08-13T14:28:53Z
TINKERPOP-2024 Make server archetype use remote traversal
Since we're promoting remote traversals over scripts it would be better for the archetype to use them.
----
> 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
> 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)