[jira] [Commented] (TINKERPOP-1822) Repeat should depth first search

2018-07-11 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-1822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16541110#comment-16541110
 ] 

ASF GitHub Bot commented on TINKERPOP-1822:
---

Github user krlohnes commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/838#discussion_r201906049
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
 ---
@@ -273,11 +300,40 @@ public RepeatEndStep(final Traversal.Admin traversal) 
{
 super(traversal);
 }
 
+final LinkedList> stashedStarts = new 
LinkedList<>();
--- End diff --

Looking at this a bit more, it looks like I misread some of the test query 
results I had, and the new commit doesn't work to make the repeat step depth 
first, so ignore that last comment. I'm still working on trying to figure out a 
new approach.


> Repeat should depth first search
> 
>
> Key: TINKERPOP-1822
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1822
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.3.0, 3.2.6
>Reporter: Robert Dale
>Priority: Major
> Attachments: bfs.jfr, default.jfr, dfs.jfr
>
>
> Perhaps optionally.
> See also:
> * https://groups.google.com/forum/#!topic/gremlin-users/gLSLxH_K-wE
> * https://github.com/apache/tinkerpop/pull/715



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


[GitHub] tinkerpop pull request #838: TINKERPOP-1822: Change default RepeatStep to DF...

2018-07-11 Thread krlohnes
Github user krlohnes commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/838#discussion_r201906049
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
 ---
@@ -273,11 +300,40 @@ public RepeatEndStep(final Traversal.Admin traversal) 
{
 super(traversal);
 }
 
+final LinkedList> stashedStarts = new 
LinkedList<>();
--- End diff --

Looking at this a bit more, it looks like I misread some of the test query 
results I had, and the new commit doesn't work to make the repeat step depth 
first, so ignore that last comment. I'm still working on trying to figure out a 
new approach.


---


[jira] [Commented] (TINKERPOP-1822) Repeat should depth first search

2018-07-11 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-1822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16541080#comment-16541080
 ] 

ASF GitHub Bot commented on TINKERPOP-1822:
---

Github user krlohnes commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/838#discussion_r201900734
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
 ---
@@ -273,11 +300,40 @@ public RepeatEndStep(final Traversal.Admin traversal) 
{
 super(traversal);
 }
 
+final LinkedList> stashedStarts = new 
LinkedList<>();
--- End diff --

@spmallette Those results are definitely...interesting to say the least. I 
think the tests themselves are reasonable, though, as a comment, I'm not 
typically using a repeat that's going to be able to utilize the 
`RepeatUnrollStrategy`. At least not for what I originally started 
investigating this for. 

That said, I took a step back and worked on performance between the BFS and 
DFS, and have gotten them much closer. On my local machine that BFS test was 
returning 889 from the counter.  With the latest commit I added, DFS is 
returning 758. That's obviously not coming close to the default "let the 
strategies do their thing" performance, but it's significantly better than the 
ops counts being in the teens for DFS. Given that I was expecting slightly 
degraded performance with DFS, I think this is in a much better place 
performance wise.


> Repeat should depth first search
> 
>
> Key: TINKERPOP-1822
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1822
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.3.0, 3.2.6
>Reporter: Robert Dale
>Priority: Major
> Attachments: bfs.jfr, default.jfr, dfs.jfr
>
>
> Perhaps optionally.
> See also:
> * https://groups.google.com/forum/#!topic/gremlin-users/gLSLxH_K-wE
> * https://github.com/apache/tinkerpop/pull/715



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


[GitHub] tinkerpop pull request #838: TINKERPOP-1822: Change default RepeatStep to DF...

2018-07-11 Thread krlohnes
Github user krlohnes commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/838#discussion_r201900734
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
 ---
@@ -273,11 +300,40 @@ public RepeatEndStep(final Traversal.Admin traversal) 
{
 super(traversal);
 }
 
+final LinkedList> stashedStarts = new 
LinkedList<>();
--- End diff --

@spmallette Those results are definitely...interesting to say the least. I 
think the tests themselves are reasonable, though, as a comment, I'm not 
typically using a repeat that's going to be able to utilize the 
`RepeatUnrollStrategy`. At least not for what I originally started 
investigating this for. 

That said, I took a step back and worked on performance between the BFS and 
DFS, and have gotten them much closer. On my local machine that BFS test was 
returning 889 from the counter.  With the latest commit I added, DFS is 
returning 758. That's obviously not coming close to the default "let the 
strategies do their thing" performance, but it's significantly better than the 
ops counts being in the teens for DFS. Given that I was expecting slightly 
degraded performance with DFS, I think this is in a much better place 
performance wise.


---


Re: Question for Detached Vertex in Tinkerpop

2018-07-11 Thread Daniel Kuppitz
To get all vertices of a specific label and their adjacent vertices
(potentially none), run:

g.V().hasLabel().
  project("v","a").
by(). // by(valueMap()) if you need the vertex
properties
by(both().dedup().fold()) // by(both().dedup().valueMap().fold()) if
you need the adjacent vertex properties


This will return a bunch of maps, each containing the two keys v and a,
where v is the vertex with the "specific label" and a is a list that
contains its adjacent vertices.

Cheers,
Daniel


On Wed, Jul 11, 2018 at 3:36 AM, antonio.lore...@relatech.com <
antonio.lore...@relatech.com> wrote:

> Hi guys,
>
>
> my name is Antonio and i'm java developer. First of all i want to
> congratulate with you for the great work you have done with Tinkerpop
> framework.
>
> I' m working with Dse Graph using Tinkerpop for developing a feature of my
> app and i'm facing a problem that i want to share with you.
>
> I've got a Rest service that must return all the vertices of a graph that
> has a certain Label and for each of them i should return also the adjacent
> vertices.
>
> I've built my Traversal properly and then i've performed the terminal step
> "toList()" for having the vertices found on Dse Graph. For each of these
> vertices i've called the "vertices" method for finding the adjacent
> vertices (with Direction.OUT as first arg and "valid_for" as second arg) .
>
> After that i've run a junit test with TinkerGraph object to simulate a db
> in memory and everything works fine but when i perform a test with Dse
> Graph remote connection i've seen that the list of vertices returned by
> "toList()" step are DetachedVertex and the method "vertices" is returning
> an empty Collection. My question is the following: is there a way for
> returning the original elements and not a DetachedVertex when i perform the
> "toList()" step, so i can call the method "vertices" and get all the
> adjacent vertices from my db?
>
>
> Thanks.
>


[GitHub] tinkerpop issue #889: Tinkerpop 1977 - Sasl Authentication

2018-07-11 Thread mattallenuk
Github user mattallenuk commented on the issue:

https://github.com/apache/tinkerpop/pull/889
  
@jorgebay Unfortunately I cannot get the integration tests to run locally 
on my mac I am getting an error on maven around 
gremlin-server:jar:3.4.0-snapshot not being found. I don't really know enough 
about maven to try and fix and cannot seem to locate anything online on how to 
fix :( 

Running the docker command failed on Gremlin-Server tests so didn't run the 
Javascript tests. 

I'll have to spend some more time trying to get the local dev env setup so 
that I can run the integration tests correctly.


---


[jira] [Commented] (TINKERPOP-967) Support nested-repeat() structures

2018-07-11 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16540021#comment-16540021
 ] 

ASF GitHub Bot commented on TINKERPOP-967:
--

Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/876
  
VOTE +1


> Support nested-repeat() structures
> --
>
> Key: TINKERPOP-967
> URL: https://issues.apache.org/jira/browse/TINKERPOP-967
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.1.0-incubating
>Reporter: Marko A. Rodriguez
>Assignee: Marko A. Rodriguez
>Priority: Major
>
> All the internal plumbing is staged for this to happen, we just haven't gone 
> all the way. In short, a {{NESTED_LOOP}} traverser has an internal 
> {{loopStack}} where {{repeat(repeat())}} will have a {{loopStack}} of two. 
> The {{it.loops()}} checks of the internal repeat will always check the top of 
> the stack and when its done repeating will delete its counter off the top of 
> the stack.
> [~dkuppitz]'s work on {{LoopStep}} will be backwards compatible. In 
> {{RepeatStep}} we will support:
> {code}
> repeat('a',out('knows').repeat('b',out('parent')))
> {code}
> and thus, things like {{loops('a')}} as well as {{times('a',2)}}. Note that 
> naming the loop stack will be a super rare case as most people will just 
> assume standard nested looping semantics with a push/pop stack.



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


[GitHub] tinkerpop issue #876: TINKERPOP-967 Support nested-repeat() structures

2018-07-11 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/876
  
VOTE +1


---


[jira] [Commented] (TINKERPOP-2003) After a long period (almost 5days)of parallel requests(almost 200 request per second),client.submit blocked

2018-07-11 Thread stephen mallette (JIRA)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-2003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16540012#comment-16540012
 ] 

stephen mallette commented on TINKERPOP-2003:
-

> May be some complex queries take a long time to run(Even if I don't 
> think).But once one request exceed the threshold,the requests following will 
> all blocked until exceed the scriptEvaluationTimeout.

It should be fairly simple for you to demonstrate that once the threshold is 
exceeded that all future requests become blocked, I don't think that is the 
case though. I believe there are tests that prove that future requests can work 
once a timeout is exceeded.

> If so ,the Gremlin server can only process the requests one by one ?

You should not be forced to make requests one at a time with sessionless 
requests. I like Robert Dale's questions.I think that you'd need to provide 
more details about those aspects of your environment. Ultimately, if there is 
some sort of bug, we'll need to narrow it down much further than where we are 
now.

> After a long period (almost 5days)of parallel requests(almost 200 request per 
> second),client.submit blocked
> ---
>
> Key: TINKERPOP-2003
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2003
> Project: TinkerPop
>  Issue Type: Bug
>  Components: driver
>Affects Versions: 3.3.0
>Reporter: xifenghz
>Priority: Major
>
> After a long period (almost 5days)of parallel requests(almost 200 request per 
> second),client.submit blocked for scriptEvaluationTimeout configured,and 
> return timeout.At the same time,many TCP connections in Gremlin Server are in 
> CLOSE_WAIT state.
> Here is my usages:
> cluster = Cluster.build(FileUtils.toFile(config)).create();
>  client = cluster.connect();
>  ResultSet resultSet = null;
>  {color:#ff}synchronized (Service.class){color}
> { resultSet = client.submit(gremlinScript); }
> CompletableFuture> future = null;
>  List results = null;
>  future = resultSet.all();
>  results = future.get();
>  
> The code snippet above runs in a java web app based on SpringMVC.I found a PR 
> related to my question.
> [https://github.com/apache/tinkerpop/pull/367/commits/58d8bade7425c7a7865382990eaaed2b7d90659c#diff-06d5dfb02d5d2c807c2387c3e9338709]
> In this PR,the author seems to say gremlin doer not support high concurrency。
> {color:#ff}Removed recommendations for submitting parallel requests on a 
> session from docs.{color}
> {color:#33}So,I submit the gremlin script in order(use synchronized 
> keyword,just as my code snippet ).But in order to lift throughput,I do not 
> lock the code for getting result from Gremlin Server。I want to know some 
> details about how Gremlin Server receive and process requests,such as the 
> receiver and executor threads are the same one?If so ,the Gremlin server can 
> only process the requests one by one ? {color}
> {color:#33}I wonder whether or not Gremlin supports high concurrency(such 
> as 200 second per second,including simple vertex or edge queries and complex 
> combinatorial queries).If so,please help to find out why the process time for 
> a simple script such as query vertex exceed scriptEvaluationTimeout. If 
> not,is there other ways to make Gremlin Server support  high concurrency,such 
> as multi-gremlinserver。{color}
> Thank you sincerely for your help。
>  



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


[jira] [Commented] (TINKERPOP-967) Support nested-repeat() structures

2018-07-11 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16540004#comment-16540004
 ] 

ASF GitHub Bot commented on TINKERPOP-967:
--

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/876
  
Nice @GCHQResearcher1337 - VOTE +1


> Support nested-repeat() structures
> --
>
> Key: TINKERPOP-967
> URL: https://issues.apache.org/jira/browse/TINKERPOP-967
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.1.0-incubating
>Reporter: Marko A. Rodriguez
>Assignee: Marko A. Rodriguez
>Priority: Major
>
> All the internal plumbing is staged for this to happen, we just haven't gone 
> all the way. In short, a {{NESTED_LOOP}} traverser has an internal 
> {{loopStack}} where {{repeat(repeat())}} will have a {{loopStack}} of two. 
> The {{it.loops()}} checks of the internal repeat will always check the top of 
> the stack and when its done repeating will delete its counter off the top of 
> the stack.
> [~dkuppitz]'s work on {{LoopStep}} will be backwards compatible. In 
> {{RepeatStep}} we will support:
> {code}
> repeat('a',out('knows').repeat('b',out('parent')))
> {code}
> and thus, things like {{loops('a')}} as well as {{times('a',2)}}. Note that 
> naming the loop stack will be a super rare case as most people will just 
> assume standard nested looping semantics with a push/pop stack.



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


[GitHub] tinkerpop issue #876: TINKERPOP-967 Support nested-repeat() structures

2018-07-11 Thread spmallette
Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/876
  
Nice @GCHQResearcher1337 - VOTE +1


---


[jira] [Commented] (TINKERPOP-2003) After a long period (almost 5days)of parallel requests(almost 200 request per second),client.submit blocked

2018-07-11 Thread Robert Dale (JIRA)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-2003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16539997#comment-16539997
 ] 

Robert Dale commented on TINKERPOP-2003:


Can you post the actual queries that time out from your Gremlin Server's 
gremlin.log?
 It should look like this
{noformat}
[WARN] AbstractEvalOpProcessor - Script evaluation exceeded the configured 
threshold for request [RequestMessage{, requestId=..., op='eval', processor='', 
args={gremlin=g.V(), batchSize=64}}]
{noformat}
It may also be helpful to see relevant stacktraces from the server.
 I would also turn on GC logging to rule out any really long garbage collection 
pause times.

What database are you using? Have you ruled out any contention there?

> After a long period (almost 5days)of parallel requests(almost 200 request per 
> second),client.submit blocked
> ---
>
> Key: TINKERPOP-2003
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2003
> Project: TinkerPop
>  Issue Type: Bug
>  Components: driver
>Affects Versions: 3.3.0
>Reporter: xifenghz
>Priority: Major
>
> After a long period (almost 5days)of parallel requests(almost 200 request per 
> second),client.submit blocked for scriptEvaluationTimeout configured,and 
> return timeout.At the same time,many TCP connections in Gremlin Server are in 
> CLOSE_WAIT state.
> Here is my usages:
> cluster = Cluster.build(FileUtils.toFile(config)).create();
>  client = cluster.connect();
>  ResultSet resultSet = null;
>  {color:#ff}synchronized (Service.class){color}
> { resultSet = client.submit(gremlinScript); }
> CompletableFuture> future = null;
>  List results = null;
>  future = resultSet.all();
>  results = future.get();
>  
> The code snippet above runs in a java web app based on SpringMVC.I found a PR 
> related to my question.
> [https://github.com/apache/tinkerpop/pull/367/commits/58d8bade7425c7a7865382990eaaed2b7d90659c#diff-06d5dfb02d5d2c807c2387c3e9338709]
> In this PR,the author seems to say gremlin doer not support high concurrency。
> {color:#ff}Removed recommendations for submitting parallel requests on a 
> session from docs.{color}
> {color:#33}So,I submit the gremlin script in order(use synchronized 
> keyword,just as my code snippet ).But in order to lift throughput,I do not 
> lock the code for getting result from Gremlin Server。I want to know some 
> details about how Gremlin Server receive and process requests,such as the 
> receiver and executor threads are the same one?If so ,the Gremlin server can 
> only process the requests one by one ? {color}
> {color:#33}I wonder whether or not Gremlin supports high concurrency(such 
> as 200 second per second,including simple vertex or edge queries and complex 
> combinatorial queries).If so,please help to find out why the process time for 
> a simple script such as query vertex exceed scriptEvaluationTimeout. If 
> not,is there other ways to make Gremlin Server support  high concurrency,such 
> as multi-gremlinserver。{color}
> Thank you sincerely for your help。
>  



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


[GitHub] tinkerpop issue #889: Tinkerpop 1977 - Sasl Authentication

2018-07-11 Thread mallenuk
Github user mallenuk commented on the issue:

https://github.com/apache/tinkerpop/pull/889
  
@jorgebay. I think option b would be the better option, however, are there 
any plans for Tinkerpop to support anything other than "PLAIN" SASL by default. 
If other auth mechanisms can be configured then really full SASL support should 
be implemented as that will give a base for other auth mechanisms to be 
implemented in future. I don't know much about SASL but I can learn :)


---


[jira] [Commented] (TINKERPOP-2003) After a long period (almost 5days)of parallel requests(almost 200 request per second),client.submit blocked

2018-07-11 Thread xifenghz (JIRA)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-2003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16539954#comment-16539954
 ] 

xifenghz commented on TINKERPOP-2003:
-

The phenomenon is after almost 5 days(at he beginning,everything goes well),the 
execution time of simple script such as  _client.submit("g.V('x')"_  or 
_results = future.get()_ exceeds the {{scriptEvaluationTimeout}}  __  
configured.May be some complex queries take a long time to run(Even if I don't 
think).But once one request exceed the threshold,the requests following will 
all blocked until exceed the {{scriptEvaluationTimeout_._}}

I want to know some details about how the sessionless Gremlin Server receive 
and process requests,e.g. the receiver and executor threads are the same one?If 
so ,the Gremlin server can only process the requests one by one ? __ 

> After a long period (almost 5days)of parallel requests(almost 200 request per 
> second),client.submit blocked
> ---
>
> Key: TINKERPOP-2003
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2003
> Project: TinkerPop
>  Issue Type: Bug
>  Components: driver
>Affects Versions: 3.3.0
>Reporter: xifenghz
>Priority: Major
>
> After a long period (almost 5days)of parallel requests(almost 200 request per 
> second),client.submit blocked for scriptEvaluationTimeout configured,and 
> return timeout.At the same time,many TCP connections in Gremlin Server are in 
> CLOSE_WAIT state.
> Here is my usages:
> cluster = Cluster.build(FileUtils.toFile(config)).create();
>  client = cluster.connect();
>  ResultSet resultSet = null;
>  {color:#ff}synchronized (Service.class){color}
> { resultSet = client.submit(gremlinScript); }
> CompletableFuture> future = null;
>  List results = null;
>  future = resultSet.all();
>  results = future.get();
>  
> The code snippet above runs in a java web app based on SpringMVC.I found a PR 
> related to my question.
> [https://github.com/apache/tinkerpop/pull/367/commits/58d8bade7425c7a7865382990eaaed2b7d90659c#diff-06d5dfb02d5d2c807c2387c3e9338709]
> In this PR,the author seems to say gremlin doer not support high concurrency。
> {color:#ff}Removed recommendations for submitting parallel requests on a 
> session from docs.{color}
> {color:#33}So,I submit the gremlin script in order(use synchronized 
> keyword,just as my code snippet ).But in order to lift throughput,I do not 
> lock the code for getting result from Gremlin Server。I want to know some 
> details about how Gremlin Server receive and process requests,such as the 
> receiver and executor threads are the same one?If so ,the Gremlin server can 
> only process the requests one by one ? {color}
> {color:#33}I wonder whether or not Gremlin supports high concurrency(such 
> as 200 second per second,including simple vertex or edge queries and complex 
> combinatorial queries).If so,please help to find out why the process time for 
> a simple script such as query vertex exceed scriptEvaluationTimeout. If 
> not,is there other ways to make Gremlin Server support  high concurrency,such 
> as multi-gremlinserver。{color}
> Thank you sincerely for your help。
>  



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


[jira] [Commented] (TINKERPOP-2003) After a long period (almost 5days)of parallel requests(almost 200 request per second),client.submit blocked

2018-07-11 Thread stephen mallette (JIRA)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-2003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16539936#comment-16539936
 ] 

stephen mallette commented on TINKERPOP-2003:
-

Ok - so it looks like your'e re-using the {{Cluster}} object already. That's 
good.

Did use of {{synchronized}} like this:

{code}
synchronized (Service.class)
{
resultSet = client.submit(gremlinScript);
}
{code}

actually fix your problem? (i sense that it didn't)

Separately, you mention that you were hitting {{scriptEvaluationTimeout}} - do 
any of your traversals normally take a long time to run? 

> After a long period (almost 5days)of parallel requests(almost 200 request per 
> second),client.submit blocked
> ---
>
> Key: TINKERPOP-2003
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2003
> Project: TinkerPop
>  Issue Type: Bug
>  Components: driver
>Affects Versions: 3.3.0
>Reporter: xifenghz
>Priority: Major
>
> After a long period (almost 5days)of parallel requests(almost 200 request per 
> second),client.submit blocked for scriptEvaluationTimeout configured,and 
> return timeout.At the same time,many TCP connections in Gremlin Server are in 
> CLOSE_WAIT state.
> Here is my usages:
> cluster = Cluster.build(FileUtils.toFile(config)).create();
>  client = cluster.connect();
>  ResultSet resultSet = null;
>  {color:#ff}synchronized (Service.class){color}
> { resultSet = client.submit(gremlinScript); }
> CompletableFuture> future = null;
>  List results = null;
>  future = resultSet.all();
>  results = future.get();
>  
> The code snippet above runs in a java web app based on SpringMVC.I found a PR 
> related to my question.
> [https://github.com/apache/tinkerpop/pull/367/commits/58d8bade7425c7a7865382990eaaed2b7d90659c#diff-06d5dfb02d5d2c807c2387c3e9338709]
> In this PR,the author seems to say gremlin doer not support high concurrency。
> {color:#ff}Removed recommendations for submitting parallel requests on a 
> session from docs.{color}
> {color:#33}So,I submit the gremlin script in order(use synchronized 
> keyword,just as my code snippet ).But in order to lift throughput,I do not 
> lock the code for getting result from Gremlin Server。I want to know some 
> details about how Gremlin Server receive and process requests,such as the 
> receiver and executor threads are the same one?If so ,the Gremlin server can 
> only process the requests one by one ? {color}
> {color:#33}I wonder whether or not Gremlin supports high concurrency(such 
> as 200 second per second,including simple vertex or edge queries and complex 
> combinatorial queries).If so,please help to find out why the process time for 
> a simple script such as query vertex exceed scriptEvaluationTimeout. If 
> not,is there other ways to make Gremlin Server support  high concurrency,such 
> as multi-gremlinserver。{color}
> Thank you sincerely for your help。
>  



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


Re: Question for Detached Vertex in Tinkerpop

2018-07-11 Thread Robert Dale
First, you should be using the Traversal API -
http://tinkerpop.apache.org/docs/current/reference/#traversal - instead of
the Graph API. Then you would return a map that represents the vertex:
g.V().out("valid_for").path().by(valueMap(true))

gremlin> g.V().out().path().by(valueMap(true))
==>[[id:1,label:person,name:[marko],age:[29]],[id:3,label:software,name:[lop],lang:[java]]]
==>[[id:1,label:person,name:[marko],age:[29]],[id:2,label:person,name:[vadas],age:[27]]]
==>[[id:1,label:person,name:[marko],age:[29]],[id:4,label:person,name:[josh],age:[32]]]
==>[[id:4,label:person,name:[josh],age:[32]],[id:5,label:software,name:[ripple],lang:[java]]]
==>[[id:4,label:person,name:[josh],age:[32]],[id:3,label:software,name:[lop],lang:[java]]]
==>[[id:6,label:person,name:[peter],age:[35]],[id:3,label:software,name:[lop],lang:[java]]]


Robert Dale


On Wed, Jul 11, 2018 at 6:51 AM antonio.lore...@relatech.com <
antonio.lore...@relatech.com> wrote:

> Hi guys,
>
>
> my name is Antonio and i'm java developer. First of all i want to
> congratulate with you for the great work you have done with Tinkerpop
> framework.
>
> I' m working with Dse Graph using Tinkerpop for developing a feature of my
> app and i'm facing a problem that i want to share with you.
>
> I've got a Rest service that must return all the vertices of a graph that
> has a certain Label and for each of them i should return also the adjacent
> vertices.
>
> I've built my Traversal properly and then i've performed the terminal step
> "toList()" for having the vertices found on Dse Graph. For each of these
> vertices i've called the "vertices" method for finding the adjacent
> vertices (with Direction.OUT as first arg and "valid_for" as second arg) .
>
> After that i've run a junit test with TinkerGraph object to simulate a db
> in memory and everything works fine but when i perform a test with Dse
> Graph remote connection i've seen that the list of vertices returned by
> "toList()" step are DetachedVertex and the method "vertices" is returning
> an empty Collection. My question is the following: is there a way for
> returning the original elements and not a DetachedVertex when i perform the
> "toList()" step, so i can call the method "vertices" and get all the
> adjacent vertices from my db?
>
>
> Thanks.
>


[jira] [Comment Edited] (TINKERPOP-2003) After a long period (almost 5days)of parallel requests(almost 200 request per second),client.submit blocked

2018-07-11 Thread xifenghz (JIRA)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-2003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16539908#comment-16539908
 ] 

xifenghz edited comment on TINKERPOP-2003 at 7/11/18 11:17 AM:
---

Sorry for not show the context for my code in detail.In my code,the cluster and 
client is singleton in my application.I just use this client to submit gremlin 
request in parallel.

 

In a restful API based on SpringPVC,I call the submit method:

List results = Service.getInstance().submit(command);

 

Below is how the class Sevice defines.

 

_public class Service{_

_private static final Logger logger = LoggerFactory.getLogger(Service.class);_
 _private static final Service INSTANCE = new Service();_
 _private Cluster cluster;_
 _private Client client;_
 _private String configPath = "remote.yaml";_
 _private Service(){_
 _try {_
 _ClassLoader configClassLoader = this.getClass().getClassLoader();_
 _URL config = null;_
 _if (configClassLoader != null) {_
 _config = configClassLoader.getResource(configPath);_
 _}_
 _if (config == null) {_
 _logger.error("cannot find config file: " + configPath);_
 _return ;_
 _}_
 _cluster = Cluster.build(FileUtils.toFile(config)).create();_
 _logger.info("create Cluster success");_
 _client = cluster.connect();_
 _logger.info("create Client success");_
 _} catch (FileNotFoundException e) {_
 _logger.error("config file is not found: ", configPath);_
 _logger.error(ExceptionUtils.getStackTrace(e));_
 _}_
 _}_

_public static Service getInstance() {_
 _return INSTANCE;_
 _}_

_public List submit(final String gremlinScript) throws 
GremlinServiceException {_
 _if (!isConnected()) {_
 _throw new GremlinServiceException("ConfigFile remote.yaml not found", 
GraphErrorCode.GraphErr.GREMLIN_CONFIG_FILE_NOT_FOUND);_
 _}_
 _logger.debug("submit script to gremlin server: " + gremlinScript);_

_ResultSet resultSet = null;_
 _synchronized (Service.class)_
 _{_
 _resultSet = client.submit(gremlinScript);_
 _}_
 _CompletableFuture> future = null;_
 _List results = null;_
 _if (resultSet != null) {_
 _future = resultSet.all();_
 _}_
 _if (future != null) {_
 _try {_
 _results = future.get();_
 _} catch (InterruptedException e) {_
 _logger.error("interrupted from gremlin server error: " + gremlinScript);_
 _throw new GremlinServiceException(e.getMessage(), 
GraphErrorCode.GraphErr.GREMLIN_QUERY_EXECUTE_FAILED);_
 _} catch (ExecutionException e) {_
 _logger.error("execution from gremlin server error: " + gremlinScript);_
 _throw new GremlinServiceException(e.getMessage(), 
GraphErrorCode.GraphErr.GREMLIN_QUERY_EXECUTE_ERROR);_
 _}_
 _}_
 _return results;_
 _}_

_}_


was (Author: hz):
Sorry for not show the context for my code in detail.

In a restful API based on SpringPVC,I call the submit method:

List results = Service.getInstance().submit(command);

 

Below is how the class Sevice defines.

 

_public class Service{_

_private static final Logger logger = LoggerFactory.getLogger(Service.class);_
 _private static final Service INSTANCE = new Service();_
 _private Cluster cluster;_
 _private Client client;_
 _private String configPath = "remote.yaml";_
 _private Service(){_
 _try {_
 _ClassLoader configClassLoader = this.getClass().getClassLoader();_
 _URL config = null;_
 _if (configClassLoader != null) {_
 _config = configClassLoader.getResource(configPath);_
 _}_
 _if (config == null) {_
 _logger.error("cannot find config file: " + configPath);_
 _return ;_
 _}_
 _cluster = Cluster.build(FileUtils.toFile(config)).create();_
 _logger.info("create Cluster success");_
 _client = cluster.connect();_
 _logger.info("create Client success");_
 _} catch (FileNotFoundException e) {_
 _logger.error("config file is not found: ", configPath);_
 _logger.error(ExceptionUtils.getStackTrace(e));_
 _}_
 _}_

_public static Service getInstance() {_
 _return INSTANCE;_
 _}_
 
 _public List submit(final String gremlinScript) throws 
GremlinServiceException {_
 _if (!isConnected()) {_
 _throw new GremlinServiceException("ConfigFile remote.yaml not found", 
GraphErrorCode.GraphErr.GREMLIN_CONFIG_FILE_NOT_FOUND);_
 _}_
 _logger.debug("submit script to gremlin server: " + gremlinScript);_

_ResultSet resultSet = null;_
 _synchronized (Service.class)_
 _{_
 _resultSet = client.submit(gremlinScript);_
 _}_
 _CompletableFuture> future = null;_
 _List results = null;_
 _if (resultSet != null) {_
 _future = resultSet.all();_
 _}_
 _if (future != null) {_
 _try {_
 _results = future.get();_
 _} catch (InterruptedException e) {_
 _logger.error("interrupted from gremlin server error: " + gremlinScript);_
 _throw new GremlinServiceException(e.getMessage(), 
GraphErrorCode.GraphErr.GREMLIN_QUERY_EXECUTE_FAILED);_
 _} catch (ExecutionException e) {_
 _logger.error("execution from gremlin server error: " + gremlinScript);_
 _throw new GremlinServiceException(e.getMessage(), 
GraphErrorCode.GraphErr.GREMLIN_QUERY_

[jira] [Commented] (TINKERPOP-2003) After a long period (almost 5days)of parallel requests(almost 200 request per second),client.submit blocked

2018-07-11 Thread xifenghz (JIRA)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-2003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16539908#comment-16539908
 ] 

xifenghz commented on TINKERPOP-2003:
-

Sorry for not show the context for my code in detail.

In a restful API based on SpringPVC,I call the submit method:

List results = Service.getInstance().submit(command);

 

Below is how the class Sevice defines.

 

_public class Service{_

_private static final Logger logger = LoggerFactory.getLogger(Service.class);_
 _private static final Service INSTANCE = new Service();_
 _private Cluster cluster;_
 _private Client client;_
 _private String configPath = "remote.yaml";_
 _private Service(){_
 _try {_
 _ClassLoader configClassLoader = this.getClass().getClassLoader();_
 _URL config = null;_
 _if (configClassLoader != null) {_
 _config = configClassLoader.getResource(configPath);_
 _}_
 _if (config == null) {_
 _logger.error("cannot find config file: " + configPath);_
 _return ;_
 _}_
 _cluster = Cluster.build(FileUtils.toFile(config)).create();_
 _logger.info("create Cluster success");_
 _client = cluster.connect();_
 _logger.info("create Client success");_
 _} catch (FileNotFoundException e) {_
 _logger.error("config file is not found: ", configPath);_
 _logger.error(ExceptionUtils.getStackTrace(e));_
 _}_
 _}_

_public static Service getInstance() {_
 _return INSTANCE;_
 _}_
 
 _public List submit(final String gremlinScript) throws 
GremlinServiceException {_
 _if (!isConnected()) {_
 _throw new GremlinServiceException("ConfigFile remote.yaml not found", 
GraphErrorCode.GraphErr.GREMLIN_CONFIG_FILE_NOT_FOUND);_
 _}_
 _logger.debug("submit script to gremlin server: " + gremlinScript);_

_ResultSet resultSet = null;_
 _synchronized (Service.class)_
 _{_
 _resultSet = client.submit(gremlinScript);_
 _}_
 _CompletableFuture> future = null;_
 _List results = null;_
 _if (resultSet != null) {_
 _future = resultSet.all();_
 _}_
 _if (future != null) {_
 _try {_
 _results = future.get();_
 _} catch (InterruptedException e) {_
 _logger.error("interrupted from gremlin server error: " + gremlinScript);_
 _throw new GremlinServiceException(e.getMessage(), 
GraphErrorCode.GraphErr.GREMLIN_QUERY_EXECUTE_FAILED);_
 _} catch (ExecutionException e) {_
 _logger.error("execution from gremlin server error: " + gremlinScript);_
 _throw new GremlinServiceException(e.getMessage(), 
GraphErrorCode.GraphErr.GREMLIN_QUERY_EXECUTE_ERROR);_
 _}_
 _}_
 _return results;_
 _}_

_}_

> After a long period (almost 5days)of parallel requests(almost 200 request per 
> second),client.submit blocked
> ---
>
> Key: TINKERPOP-2003
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2003
> Project: TinkerPop
>  Issue Type: Bug
>  Components: driver
>Affects Versions: 3.3.0
>Reporter: xifenghz
>Priority: Major
>
> After a long period (almost 5days)of parallel requests(almost 200 request per 
> second),client.submit blocked for scriptEvaluationTimeout configured,and 
> return timeout.At the same time,many TCP connections in Gremlin Server are in 
> CLOSE_WAIT state.
> Here is my usages:
> cluster = Cluster.build(FileUtils.toFile(config)).create();
>  client = cluster.connect();
>  ResultSet resultSet = null;
>  {color:#ff}synchronized (Service.class){color}
> { resultSet = client.submit(gremlinScript); }
> CompletableFuture> future = null;
>  List results = null;
>  future = resultSet.all();
>  results = future.get();
>  
> The code snippet above runs in a java web app based on SpringMVC.I found a PR 
> related to my question.
> [https://github.com/apache/tinkerpop/pull/367/commits/58d8bade7425c7a7865382990eaaed2b7d90659c#diff-06d5dfb02d5d2c807c2387c3e9338709]
> In this PR,the author seems to say gremlin doer not support high concurrency。
> {color:#ff}Removed recommendations for submitting parallel requests on a 
> session from docs.{color}
> {color:#33}So,I submit the gremlin script in order(use synchronized 
> keyword,just as my code snippet ).But in order to lift throughput,I do not 
> lock the code for getting result from Gremlin Server。I want to know some 
> details about how Gremlin Server receive and process requests,such as the 
> receiver and executor threads are the same one?If so ,the Gremlin server can 
> only process the requests one by one ? {color}
> {color:#33}I wonder whether or not Gremlin supports high concurrency(such 
> as 200 second per second,including simple vertex or edge queries and complex 
> combinatorial queries).If so,please help to find out why the process time for 
> a simple script such as query vertex exceed scriptEvaluationTimeout. If 
> not,is there other ways to make Gremlin Server support  high concurrency,such 
> as multi-gremlinserver。{color}

[jira] [Commented] (TINKERPOP-2003) After a long period (almost 5days)of parallel requests(almost 200 request per second),client.submit blocked

2018-07-11 Thread stephen mallette (JIRA)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-2003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16539898#comment-16539898
 ] 

stephen mallette commented on TINKERPOP-2003:
-

You aren't using a session so that code snippet/comments you found do not apply 
to you, To [configure a 
session|http://tinkerpop.apache.org/docs/current/reference/#sessions] you need 
to do this:

{code}
client = cluster.connect("sessionName");
{code}

but you are simply doing:

{code}
client = cluster.connect();
{code}

and thus your {{client}} is sessionless. You should not need to synchronize 
your code at all. Your code example does not show the context for how it is 
used, but if you are not re-using your {{cluster}} instance for the life of 
your application and are constructing many of them quickly only to destroy 
them, I would guess that might be part of your problem. 

> After a long period (almost 5days)of parallel requests(almost 200 request per 
> second),client.submit blocked
> ---
>
> Key: TINKERPOP-2003
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2003
> Project: TinkerPop
>  Issue Type: Bug
>  Components: driver
>Affects Versions: 3.3.0
>Reporter: xifenghz
>Priority: Major
>
> After a long period (almost 5days)of parallel requests(almost 200 request per 
> second),client.submit blocked for scriptEvaluationTimeout configured,and 
> return timeout.At the same time,many TCP connections in Gremlin Server are in 
> CLOSE_WAIT state.
> Here is my usages:
> cluster = Cluster.build(FileUtils.toFile(config)).create();
>  client = cluster.connect();
>  ResultSet resultSet = null;
>  {color:#ff}synchronized (Service.class){color}
> { resultSet = client.submit(gremlinScript); }
> CompletableFuture> future = null;
>  List results = null;
>  future = resultSet.all();
>  results = future.get();
>  
> The code snippet above runs in a java web app based on SpringMVC.I found a PR 
> related to my question.
> [https://github.com/apache/tinkerpop/pull/367/commits/58d8bade7425c7a7865382990eaaed2b7d90659c#diff-06d5dfb02d5d2c807c2387c3e9338709]
> In this PR,the author seems to say gremlin doer not support high concurrency。
> {color:#ff}Removed recommendations for submitting parallel requests on a 
> session from docs.{color}
> {color:#33}So,I submit the gremlin script in order(use synchronized 
> keyword,just as my code snippet ).But in order to lift throughput,I do not 
> lock the code for getting result from Gremlin Server。I want to know some 
> details about how Gremlin Server receive and process requests,such as the 
> receiver and executor threads are the same one?If so ,the Gremlin server can 
> only process the requests one by one ? {color}
> {color:#33}I wonder whether or not Gremlin supports high concurrency(such 
> as 200 second per second,including simple vertex or edge queries and complex 
> combinatorial queries).If so,please help to find out why the process time for 
> a simple script such as query vertex exceed scriptEvaluationTimeout. If 
> not,is there other ways to make Gremlin Server support  high concurrency,such 
> as multi-gremlinserver。{color}
> Thank you sincerely for your help。
>  



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


Question for Detached Vertex in Tinkerpop

2018-07-11 Thread antonio . loregio
Hi guys,


my name is Antonio and i'm java developer. First of all i want to congratulate 
with you for the great work you have done with Tinkerpop framework.

I' m working with Dse Graph using Tinkerpop for developing a feature of my app 
and i'm facing a problem that i want to share with you.

I've got a Rest service that must return all the vertices of a graph that has a 
certain Label and for each of them i should return also the adjacent vertices.

I've built my Traversal properly and then i've performed the terminal step 
"toList()" for having the vertices found on Dse Graph. For each of these 
vertices i've called the "vertices" method for finding the adjacent vertices 
(with Direction.OUT as first arg and "valid_for" as second arg) .

After that i've run a junit test with TinkerGraph object to simulate a db in 
memory and everything works fine but when i perform a test with Dse Graph 
remote connection i've seen that the list of vertices returned by "toList()" 
step are DetachedVertex and the method "vertices" is returning an empty 
Collection. My question is the following: is there a way for returning the 
original elements and not a DetachedVertex when i perform the "toList()" step, 
so i can call the method "vertices" and get all the adjacent vertices from my 
db?


Thanks.


Re: [DISCUSS] Review Process

2018-07-11 Thread Stephen Mallette
oops - Pieter, i read your post last night then replied this morning
thinking I remembered everything you wrote - you actually called for
different email/jira lists as well.I guess that would be helpful to
some but not others. For me personally, that would be massively burdensome
tbh.

On Wed, Jul 11, 2018 at 6:46 AM Stephen Mallette 
wrote:

> Thanks for everyone's thoughts - some replies, first to Jason:
>
> >   but I agree that nagging is not a great path forward.
>
> Robert Dale has already expressed his sadness that my nags are going away
>
> >  It'd be great to have these examples added to the maintainer
> guidelines.
>
> i've said as much before in different places but it's not in the dev docs.
> of course, depending on how this thread ends the dev docs will need some
> changes in this area all around so we'll see about adding such things.
>
> >   If the contribution is a major feature or significant change, the
> expectation is that the committer realizes this and holds it open for 3
> votes before committing.
>
> So, here's my thinking on "major feature" - if the committer had done
> things properly the "major feature" would have already had major
> visibility. There would have been some form of DISCUSS thread ahead of
> time, plus a JIRA ticket with more information. If it was a "major" third
> party submission, a committer would not +1 and walk away but suggest to the
> third-party that we need to bring this to the attention of dev in some way.
> How about this, perhaps in the DISCUSS/JiRA anyone might call for a "review
> of 3" (reserving of course for a -1 veto) in which case the "cooling
> period" wouldn't apply and we'd need the 3 +1s from committers.
>
> As for Pieter:
>
> >  Perhaps for version 4 the project should be broken up
>
> Maybe, though I've come to to really like our giant uber project. Having
> everything together has so many great benefits and somehow we've managed to
> keep the whole thing relatively easy to build and deploy. Breaking up the
> project repositories however would not allow you to really hide from the
> expansiveness we've grown in to. This dev list would still be the location
> for all discussion and we'd still likely have a single JIRA instance so I
> don't see that providing much relief if you're feeling that way
> unfortunately.
>
>
>
> On Tue, Jul 10, 2018 at 4:19 PM pieter gmail 
> wrote:
>
>> Hi,
>>
>> I feel like the project has become a bit too big and dispersed. A large
>> portion of the emails, jira or otherwise are irrelevant to my
>> interest/time/work.
>>
>> Perhaps for version 4, TinkerPop could be broken up into more focused
>> projects with their own jira/email/process management.
>>
>> gremlin-language
>> gremlin-server
>> js-driver
>> python-driver
>> java-driver
>> .net-driver
>> reference implementation
>> ...
>>
>> Thanks
>> Pieter
>>
>>
>>
>>
>> Perhaps for version 4 the project should be broken up
>>
>> On 10/07/2018 22:01, Jason Plurad wrote:
>> > Thanks for starting this conversation, Stephen. Lots of interesting
>> tidbits
>> > here, and perhaps some we can apply to other OSS projects.
>> >
>> >> I'm not sure if committers/PMC members have just not had time to do
>> > reviews or have not felt comfortable doing them
>> >
>> > Probably a combination of both, especially with the GLVs.
>> >
>> >> I personally chase votes in the background to get PRs to
>> merge.and, I
>> > don't want to do that anymore.
>> >
>> > Amazing that you did that, but I agree that nagging is not a great path
>> > forward.
>> >
>> >> it is perfectly fine to review/VOTE in the following manner (as
>> examples)
>> > It'd be great to have these examples added to the maintainer guidelines.
>> > When I do code reviews, sometimes I feel like one-liner votes are a bit
>> of
>> > a cop out, but having examples like this would lower the mental hurdle
>> to
>> > getting started on reviewing.
>> >
>> >> It would also be nice for non-committers to do reviews - i don't know
>> how
>> > to encourage that behavior though.
>> >
>> > I agree on this, and it would be particularly important on areas of the
>> > code where we only have one primary committer, like each GLV. If we
>> come to
>> > agreement on a new policy, I'd suggest that if we get the docs written
>> up
>> > and published, then we can mention it on gremlin-users sort of as a
>> heads
>> > up to those interested in getting more involved. Their participation
>> helps
>> > drive out releases, and new releases attract more users.
>> >
>> > Regarding the proposal, a single binding +1 from a committer with a 1
>> week
>> > lazy consensus sounds fine to me. If the contribution is a major
>> feature or
>> > significant change, the expectation is that the committer realizes this
>> and
>> > holds it open for 3 votes before committing.
>> >
>> >
>> >
>> > On Tue, Jul 10, 2018 at 1:46 PM, Stephen Mallette > >
>> > wrote:
>> >
>> >> Good point, Ted - that wasn't clear and in truth I didn't think that
>> >> through well. I 

Re: [DISCUSS] Review Process

2018-07-11 Thread Stephen Mallette
Thanks for everyone's thoughts - some replies, first to Jason:

>   but I agree that nagging is not a great path forward.

Robert Dale has already expressed his sadness that my nags are going away

>  It'd be great to have these examples added to the maintainer guidelines.

i've said as much before in different places but it's not in the dev docs.
of course, depending on how this thread ends the dev docs will need some
changes in this area all around so we'll see about adding such things.

>   If the contribution is a major feature or significant change, the
expectation is that the committer realizes this and holds it open for 3
votes before committing.

So, here's my thinking on "major feature" - if the committer had done
things properly the "major feature" would have already had major
visibility. There would have been some form of DISCUSS thread ahead of
time, plus a JIRA ticket with more information. If it was a "major" third
party submission, a committer would not +1 and walk away but suggest to the
third-party that we need to bring this to the attention of dev in some way.
How about this, perhaps in the DISCUSS/JiRA anyone might call for a "review
of 3" (reserving of course for a -1 veto) in which case the "cooling
period" wouldn't apply and we'd need the 3 +1s from committers.

As for Pieter:

>  Perhaps for version 4 the project should be broken up

Maybe, though I've come to to really like our giant uber project. Having
everything together has so many great benefits and somehow we've managed to
keep the whole thing relatively easy to build and deploy. Breaking up the
project repositories however would not allow you to really hide from the
expansiveness we've grown in to. This dev list would still be the location
for all discussion and we'd still likely have a single JIRA instance so I
don't see that providing much relief if you're feeling that way
unfortunately.



On Tue, Jul 10, 2018 at 4:19 PM pieter gmail 
wrote:

> Hi,
>
> I feel like the project has become a bit too big and dispersed. A large
> portion of the emails, jira or otherwise are irrelevant to my
> interest/time/work.
>
> Perhaps for version 4, TinkerPop could be broken up into more focused
> projects with their own jira/email/process management.
>
> gremlin-language
> gremlin-server
> js-driver
> python-driver
> java-driver
> .net-driver
> reference implementation
> ...
>
> Thanks
> Pieter
>
>
>
>
> Perhaps for version 4 the project should be broken up
>
> On 10/07/2018 22:01, Jason Plurad wrote:
> > Thanks for starting this conversation, Stephen. Lots of interesting
> tidbits
> > here, and perhaps some we can apply to other OSS projects.
> >
> >> I'm not sure if committers/PMC members have just not had time to do
> > reviews or have not felt comfortable doing them
> >
> > Probably a combination of both, especially with the GLVs.
> >
> >> I personally chase votes in the background to get PRs to merge.and,
> I
> > don't want to do that anymore.
> >
> > Amazing that you did that, but I agree that nagging is not a great path
> > forward.
> >
> >> it is perfectly fine to review/VOTE in the following manner (as
> examples)
> > It'd be great to have these examples added to the maintainer guidelines.
> > When I do code reviews, sometimes I feel like one-liner votes are a bit
> of
> > a cop out, but having examples like this would lower the mental hurdle to
> > getting started on reviewing.
> >
> >> It would also be nice for non-committers to do reviews - i don't know
> how
> > to encourage that behavior though.
> >
> > I agree on this, and it would be particularly important on areas of the
> > code where we only have one primary committer, like each GLV. If we come
> to
> > agreement on a new policy, I'd suggest that if we get the docs written up
> > and published, then we can mention it on gremlin-users sort of as a heads
> > up to those interested in getting more involved. Their participation
> helps
> > drive out releases, and new releases attract more users.
> >
> > Regarding the proposal, a single binding +1 from a committer with a 1
> week
> > lazy consensus sounds fine to me. If the contribution is a major feature
> or
> > significant change, the expectation is that the committer realizes this
> and
> > holds it open for 3 votes before committing.
> >
> >
> >
> > On Tue, Jul 10, 2018 at 1:46 PM, Stephen Mallette 
> > wrote:
> >
> >> Good point, Ted - that wasn't clear and in truth I didn't think that
> >> through well. I think we could say that that the +1 would come from a
> >> committer. If the committer and submitter are one in the same then it
> has
> >> its single VOTE and technically, the PR just goes through the week long
> >> cooling period and could be merged after that. In the event the PR
> >> submitter is not a committer then they would require at least one
> committer
> >> to be on board with a +1 and a week long wait.
> >>
> >> Ideally, I think we can trust committers enough to do smart things with
> >> this change

[GitHub] tinkerpop issue #889: Tinkerpop 1977 - Sasl Authentication

2018-07-11 Thread jorgebay
Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/889
  
Looking at Python and C# GLVs support for authentication, I think there are 
2 possible routes:
a) Provide a simple plain text auth mechanism, similar to Python and C# 
GLVs: 
https://github.com/apache/tinkerpop/blob/tp33/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py#L79-L82
b) Provide a full blown SASL authenticator.

The easiest one is doing a), and that's it. If you plan to support b) with 
an `Authenticator` interface, we should make sure that it will support 
different SASL auth mechanisms. For example: `Authenticator` should create a 
new instance of `SaslClient`, sending the host name, etc.. This `SaslClient` 
evaluates each challenge and creates a new one for the server, similar to 
https://github.com/apache/tinkerpop/blob/tp33/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java#L88-L110


---


[GitHub] tinkerpop pull request #889: Tinkerpop 1977 - Sasl Authentication

2018-07-11 Thread jorgebay
Github user jorgebay commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/889#discussion_r201601044
  
--- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
 ---
@@ -151,7 +156,16 @@ class DriverRemoteConnection extends RemoteConnection {
   return;
 }
 
-if (response.status.code >= 400) {
+if (response.status.code === 
responseStatusCode.authenticationChallenge && this._authenticator) {
+  this._authenticator.evaluateChallenge(response).then(res => {
--- End diff --

We should have a way to build a request (in this case an auth request) and 
send it providing an existing `requestId`, that doesn't add a key to the 
`this._responseHandlers`. That way the whole flow uses the same `requestId` and 
the response handler w/ the original callback is maintained until the response 
message (out of the auth flow) for the original request is obtained.


---


[GitHub] tinkerpop pull request #889: Tinkerpop 1977 - Sasl Authentication

2018-07-11 Thread jorgebay
Github user jorgebay commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/889#discussion_r201599552
  
--- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
 ---
@@ -151,7 +156,16 @@ class DriverRemoteConnection extends RemoteConnection {
   return;
 }
 
-if (response.status.code >= 400) {
+if (response.status.code === 
responseStatusCode.authenticationChallenge && this._authenticator) {
+  this._authenticator.evaluateChallenge(response).then(res => {
--- End diff --

You are right, I was thinking each request have to have their own unique 
request id, but its not the case for auth.

The requestId that have to be sent should be the same as the one in the 
response.


---