Re: [DISCUSS] Adding motif support to match()

2021-02-04 Thread pieter gmail
+1

Cheers
Pieter

On Thu, 2021-02-04 at 17:15 -0800, Joshua Shinavier wrote:
> Initial thought: if the ASCII art syntax is Cypher-like, why not make
> it
> openCypher proper? I.e. keep match() as it is, but generalize the
> cypher()
> step out of Neo4jGraph, with native Neo4j evaluation of Cypher as an
> optimization.
> 
> Josh
> 
> 
> On Thu, Feb 4, 2021 at 2:17 PM David Bechberger 
> wrote:
> 
> > Over the years of working with Gremlin I have foudn the match()
> > step is
> > difficult to create traversals with and even more difficult to make
> > it work
> > efficently.  While the imperative style of programming in Gremlin
> > provides
> > a powerful path finding mechanism it really lacks an easy way to
> > perform
> > pattern matching queries.  It would be great if we could simplify
> > the
> > match() step to enable users to easily generate these pattern
> > matching
> > traversals.
> > 
> > To accomplish this I was wondering what adding support for a subset
> > of
> > motif/ascii art patterns to the match step might look like.  These
> > types of
> > patterns are very easy for people to understand and I think the
> > ability to
> > combine these pattern matching syntax with the powerful path
> > finding and
> > formatting features of Gremlin would make a powerful combination.
> > 
> > To accomplish this I am suggesting supporting a subset of potential
> > patterns.  The two most common examples of this sort of pattern out
> > there
> > are the openCypher type style and the style used by GraphX.  I have
> > provided a few examples below of what this syntax might look like:
> > 
> > e.g. openCypher style
> > 
> > Find me everything within one hop
> > g.V().match("()-[]->()")
> > 
> > Find me everything within one hop of a Person vertex
> > g.V().match("(p:Person)-[]->()")
> > 
> > Find me all Companies within one hop of a Person vertex
> > g.V().match("(p:Person)-[]->(c:Company)")
> > 
> > Find me all Companies within one hop of a Person vertex with an
> > Employed_at
> > edge
> > g.V().match("(p:Person)-[e:employed_at]->(c:Company)")
> > 
> > 
> > The other option would be to take more of a hybrid approach and use
> > only
> > the basic art/motifs like GraphX and apply the additional filtering
> > in a
> > hybrid type of mode like this:
> > 
> > Find me all Companies within one hop of a Person vertex with an
> > Employed_at
> > edge
> > g.V().match("(p)-[e]->(c)",
> > __.as('p').hasLabel('Person'),
> > __.as('e').hasLabel('employed_at'),
> > __.as('c').hasLabel('Company'),
> > )
> > 
> > This also has the potential to enable some significantly more
> > complex
> > patterns like "Find me all Companies within one hop of a Person
> > vertex with
> > an Employed_at edge who also worked at Foo"
> > g.V().match("(p)-[e]->(c)",
> > __.as('p').hasLabel('Person').out('employed_at').has('Company',
> > 'name',
> > 'Foo'),
> > __.as('e').hasLabel('employed_at'),
> > __.as('c').hasLabel('Company'),
> > )
> > 
> > Thoughts?
> > 
> > Dave
> > 



Re: [DISCUSS] Adding motif support to match()

2021-02-04 Thread Joshua Shinavier
Initial thought: if the ASCII art syntax is Cypher-like, why not make it
openCypher proper? I.e. keep match() as it is, but generalize the cypher()
step out of Neo4jGraph, with native Neo4j evaluation of Cypher as an
optimization.

Josh


On Thu, Feb 4, 2021 at 2:17 PM David Bechberger  wrote:

> Over the years of working with Gremlin I have foudn the match() step is
> difficult to create traversals with and even more difficult to make it work
> efficently.  While the imperative style of programming in Gremlin provides
> a powerful path finding mechanism it really lacks an easy way to perform
> pattern matching queries.  It would be great if we could simplify the
> match() step to enable users to easily generate these pattern matching
> traversals.
>
> To accomplish this I was wondering what adding support for a subset of
> motif/ascii art patterns to the match step might look like.  These types of
> patterns are very easy for people to understand and I think the ability to
> combine these pattern matching syntax with the powerful path finding and
> formatting features of Gremlin would make a powerful combination.
>
> To accomplish this I am suggesting supporting a subset of potential
> patterns.  The two most common examples of this sort of pattern out there
> are the openCypher type style and the style used by GraphX.  I have
> provided a few examples below of what this syntax might look like:
>
> e.g. openCypher style
>
> Find me everything within one hop
> g.V().match("()-[]->()")
>
> Find me everything within one hop of a Person vertex
> g.V().match("(p:Person)-[]->()")
>
> Find me all Companies within one hop of a Person vertex
> g.V().match("(p:Person)-[]->(c:Company)")
>
> Find me all Companies within one hop of a Person vertex with an Employed_at
> edge
> g.V().match("(p:Person)-[e:employed_at]->(c:Company)")
>
>
> The other option would be to take more of a hybrid approach and use only
> the basic art/motifs like GraphX and apply the additional filtering in a
> hybrid type of mode like this:
>
> Find me all Companies within one hop of a Person vertex with an Employed_at
> edge
> g.V().match("(p)-[e]->(c)",
> __.as('p').hasLabel('Person'),
> __.as('e').hasLabel('employed_at'),
> __.as('c').hasLabel('Company'),
> )
>
> This also has the potential to enable some significantly more complex
> patterns like "Find me all Companies within one hop of a Person vertex with
> an Employed_at edge who also worked at Foo"
> g.V().match("(p)-[e]->(c)",
> __.as('p').hasLabel('Person').out('employed_at').has('Company', 'name',
> 'Foo'),
> __.as('e').hasLabel('employed_at'),
> __.as('c').hasLabel('Company'),
> )
>
> Thoughts?
>
> Dave
>


[DISCUSS] Adding motif support to match()

2021-02-04 Thread David Bechberger
Over the years of working with Gremlin I have foudn the match() step is
difficult to create traversals with and even more difficult to make it work
efficently.  While the imperative style of programming in Gremlin provides
a powerful path finding mechanism it really lacks an easy way to perform
pattern matching queries.  It would be great if we could simplify the
match() step to enable users to easily generate these pattern matching
traversals.

To accomplish this I was wondering what adding support for a subset of
motif/ascii art patterns to the match step might look like.  These types of
patterns are very easy for people to understand and I think the ability to
combine these pattern matching syntax with the powerful path finding and
formatting features of Gremlin would make a powerful combination.

To accomplish this I am suggesting supporting a subset of potential
patterns.  The two most common examples of this sort of pattern out there
are the openCypher type style and the style used by GraphX.  I have
provided a few examples below of what this syntax might look like:

e.g. openCypher style

Find me everything within one hop
g.V().match("()-[]->()")

Find me everything within one hop of a Person vertex
g.V().match("(p:Person)-[]->()")

Find me all Companies within one hop of a Person vertex
g.V().match("(p:Person)-[]->(c:Company)")

Find me all Companies within one hop of a Person vertex with an Employed_at
edge
g.V().match("(p:Person)-[e:employed_at]->(c:Company)")


The other option would be to take more of a hybrid approach and use only
the basic art/motifs like GraphX and apply the additional filtering in a
hybrid type of mode like this:

Find me all Companies within one hop of a Person vertex with an Employed_at
edge
g.V().match("(p)-[e]->(c)",
__.as('p').hasLabel('Person'),
__.as('e').hasLabel('employed_at'),
__.as('c').hasLabel('Company'),
)

This also has the potential to enable some significantly more complex
patterns like "Find me all Companies within one hop of a Person vertex with
an Employed_at edge who also worked at Foo"
g.V().match("(p)-[e]->(c)",
__.as('p').hasLabel('Person').out('employed_at').has('Company', 'name',
'Foo'),
__.as('e').hasLabel('employed_at'),
__.as('c').hasLabel('Company'),
)

Thoughts?

Dave


[jira] [Commented] (TINKERPOP-2512) Duplicate jars in classpath when running gremlin-server.sh

2021-02-04 Thread ASF GitHub Bot (Jira)


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

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

spmallette commented on pull request #1385:
URL: https://github.com/apache/tinkerpop/pull/1385#issuecomment-773596173


   Thank you merged this under: 63bb830d9e0271418040fafe596b3a337e60ee18



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Duplicate jars in classpath when running gremlin-server.sh
> --
>
> Key: TINKERPOP-2512
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2512
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.10
>Reporter: Clément de Groc
>Assignee: Stephen Mallette
>Priority: Minor
> Fix For: 3.5.0, 3.4.11
>
>
> First noticed with [JanusGraph's 
> gremlin-server.sh|https://github.com/JanusGraph/janusgraph/blob/v0.5.3/janusgraph-dist/src/assembly/static/bin/gremlin-server.sh]
>  but also seems to apply to [TinkerPop's 
> gremlin-server.sh|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh]:
>  the Java classpath contains every jar twice.
> I think this is due to the following
>  * A {{CP}} variable is built 
> ([gremlin-server.sh#L97-L101|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh#L98-L101])
>  * A {{CLASSPATH}} variable is created and assigned CP 
> ([gremlin-server.sh#L103|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh#L103])
>  * Java is started with {{-cp $CP:$CLASSPATH}} 
> ([gremlin-server.sh#L169|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh#L169],
>  gremlin-server.sh#L187, ...)
> Not setting the {{CLASSPATH}} variable or starting java with {{-cp $CP}} 
> should be enough.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (TINKERPOP-2512) Duplicate jars in classpath when running gremlin-server.sh

2021-02-04 Thread Stephen Mallette (Jira)


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

Stephen Mallette closed TINKERPOP-2512.
---
Fix Version/s: 3.4.11
   3.5.0
 Assignee: Stephen Mallette
   Resolution: Fixed

> Duplicate jars in classpath when running gremlin-server.sh
> --
>
> Key: TINKERPOP-2512
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2512
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.10
>Reporter: Clément de Groc
>Assignee: Stephen Mallette
>Priority: Minor
> Fix For: 3.5.0, 3.4.11
>
>
> First noticed with [JanusGraph's 
> gremlin-server.sh|https://github.com/JanusGraph/janusgraph/blob/v0.5.3/janusgraph-dist/src/assembly/static/bin/gremlin-server.sh]
>  but also seems to apply to [TinkerPop's 
> gremlin-server.sh|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh]:
>  the Java classpath contains every jar twice.
> I think this is due to the following
>  * A {{CP}} variable is built 
> ([gremlin-server.sh#L97-L101|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh#L98-L101])
>  * A {{CLASSPATH}} variable is created and assigned CP 
> ([gremlin-server.sh#L103|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh#L103])
>  * Java is started with {{-cp $CP:$CLASSPATH}} 
> ([gremlin-server.sh#L169|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh#L169],
>  gremlin-server.sh#L187, ...)
> Not setting the {{CLASSPATH}} variable or starting java with {{-cp $CP}} 
> should be enough.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2512) Duplicate jars in classpath when running gremlin-server.sh

2021-02-04 Thread ASF GitHub Bot (Jira)


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

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

spmallette closed pull request #1385:
URL: https://github.com/apache/tinkerpop/pull/1385


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Duplicate jars in classpath when running gremlin-server.sh
> --
>
> Key: TINKERPOP-2512
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2512
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.10
>Reporter: Clément de Groc
>Priority: Minor
>
> First noticed with [JanusGraph's 
> gremlin-server.sh|https://github.com/JanusGraph/janusgraph/blob/v0.5.3/janusgraph-dist/src/assembly/static/bin/gremlin-server.sh]
>  but also seems to apply to [TinkerPop's 
> gremlin-server.sh|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh]:
>  the Java classpath contains every jar twice.
> I think this is due to the following
>  * A {{CP}} variable is built 
> ([gremlin-server.sh#L97-L101|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh#L98-L101])
>  * A {{CLASSPATH}} variable is created and assigned CP 
> ([gremlin-server.sh#L103|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh#L103])
>  * Java is started with {{-cp $CP:$CLASSPATH}} 
> ([gremlin-server.sh#L169|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh#L169],
>  gremlin-server.sh#L187, ...)
> Not setting the {{CLASSPATH}} variable or starting java with {{-cp $CP}} 
> should be enough.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (TINKERPOP-2520) Add the ability to reverse the stream or a collection

2021-02-04 Thread Stephen Mallette (Jira)


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

Stephen Mallette updated TINKERPOP-2520:

Affects Version/s: 3.4.10

> Add the ability to reverse the stream or a collection
> -
>
> Key: TINKERPOP-2520
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2520
> Project: TinkerPop
>  Issue Type: New Feature
>Affects Versions: 3.4.10
>Reporter: Kelvin R. Lawrence
>Priority: Minor
>
> I had a Gremlin user ask me yesterday if there was a way to have the results 
> of a `path` step be reversed. Today you cannot do that using `from` and `to` 
> steps as the `from` label must appear before the `to` label in a path. In 
> thinking about this, perhaps adding a `reverse` option to order (on top of 
> `asc`,`desc` and `shuffle`) would be a nice addition to Gremlin. So you could 
> write something like:
> {code:java}
> g.V().out().out().path().order(local).by(reverse){code}
> For this specific user they were union-ing a set of paths in different 
> directions and wanted to normalize them to all be in the same direction when 
> presented as results.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (TINKERPOP-2520) Add the ability to reverse the stream or a collection

2021-02-04 Thread Stephen Mallette (Jira)


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

Stephen Mallette updated TINKERPOP-2520:

Component/s: process
 Issue Type: Improvement  (was: New Feature)

> Add the ability to reverse the stream or a collection
> -
>
> Key: TINKERPOP-2520
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2520
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.10
>Reporter: Kelvin R. Lawrence
>Priority: Minor
>
> I had a Gremlin user ask me yesterday if there was a way to have the results 
> of a `path` step be reversed. Today you cannot do that using `from` and `to` 
> steps as the `from` label must appear before the `to` label in a path. In 
> thinking about this, perhaps adding a `reverse` option to order (on top of 
> `asc`,`desc` and `shuffle`) would be a nice addition to Gremlin. So you could 
> write something like:
> {code:java}
> g.V().out().out().path().order(local).by(reverse){code}
> For this specific user they were union-ing a set of paths in different 
> directions and wanted to normalize them to all be in the same direction when 
> presented as results.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (TINKERPOP-2521) Expand range() to allow other negative operations

2021-02-04 Thread Stephen Mallette (Jira)
Stephen Mallette created TINKERPOP-2521:
---

 Summary: Expand range() to allow other negative operations
 Key: TINKERPOP-2521
 URL: https://issues.apache.org/jira/browse/TINKERPOP-2521
 Project: TinkerPop
  Issue Type: Improvement
  Components: process
Affects Versions: 3.4.10
Reporter: Stephen Mallette


We currently allow {{range(0,-1)}} where the "-1" represents all items through 
the end of the stream. If we allowed for negatives like say "-2" it would mean 
all items through the end of the stream except for the last and that would 
provide "but last" sorts of semantics which is helpful in cases like this where 
trickery is needed to filter away the "last" item in the stream:

https://stackoverflow.com/a/66048029





--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2379) Consistent defaults and initialization APIs for drivers

2021-02-04 Thread Kelvin R. Lawrence (Jira)


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

Kelvin R. Lawrence commented on TINKERPOP-2379:
---

Related to driver defaults/initialization consistency:

The Python client does not specify a default max content length. It inherits 
whatever Tornado defaults to (10mb in 4.5.3 for example). However, if Kerberos 
is used, the code in the client hard codes 65536 into the web socket frame 
header bits in that specific case. This will lead to different behavior and 
potentially unexpected frame size exceeded errors errors. We should really have 
consistent defaults across all the clients.

There is a separate Jira open to add the ability in the Python client for the 
user to override the max content length. No such feature exists today. 

> Consistent defaults and initialization APIs for drivers
> ---
>
> Key: TINKERPOP-2379
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2379
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: driver
>Affects Versions: 3.4.6
>Reporter: Stephen Mallette
>Priority: Minor
>
> Some drivers allow the connection URL to be directly set which means that it 
> is wholly configurable. For example, Javascript allows:
> {code}
> const g = traversal().withRemote(new 
> DriverRemoteConnection('ws://localhost:8182/gremlin'));
> {code}
> Python allows something similar, but Java and .NET do not. I don't recall a 
> reason for that inconsistency and there are times when it seems that such 
> options would be helpful.
> In addition, some drivers will take a file for configuration and some will 
> not. Furthermore, defaults for various settings are different from one driver 
> to the next. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (TINKERPOP-2519) Add ability to order by reverse

2021-02-04 Thread Dave Bechberger (Jira)


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

Dave Bechberger resolved TINKERPOP-2519.

Resolution: Duplicate

> Add ability to order by reverse
> ---
>
> Key: TINKERPOP-2519
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2519
> Project: TinkerPop
>  Issue Type: New Feature
>Reporter: Dave Bechberger
>Priority: Major
>
> In addition to the current options we should add the ability to reverse the 
> order of items using something like a keyword of Order.reverse.  This would 
> return the reverse order of traversals flowing in.  This could be used to 
> perform tasks such as reversing the order of a path:
> {{ {{g.V().out().path().order(local).by(Order.reverse)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (TINKERPOP-2520) Add the ability to reverse the stream or a collection

2021-02-04 Thread Kelvin R. Lawrence (Jira)
Kelvin R. Lawrence created TINKERPOP-2520:
-

 Summary: Add the ability to reverse the stream or a collection
 Key: TINKERPOP-2520
 URL: https://issues.apache.org/jira/browse/TINKERPOP-2520
 Project: TinkerPop
  Issue Type: New Feature
Reporter: Kelvin R. Lawrence


I had a Gremlin user ask me yesterday if there was a way to have the results of 
a `path` step be reversed. Today you cannot do that using `from` and `to` steps 
as the `from` label must appear before the `to` label in a path. In thinking 
about this, perhaps adding a `reverse` option to order (on top of `asc`,`desc` 
and `shuffle`) would be a nice addition to Gremlin. So you could write 
something like:
{code:java}
g.V().out().out().path().order(local).by(reverse){code}
For this specific user they were union-ing a set of paths in different 
directions and wanted to normalize them to all be in the same direction when 
presented as results.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (TINKERPOP-2519) Add ability to order by reverse

2021-02-04 Thread Dave Bechberger (Jira)
Dave Bechberger created TINKERPOP-2519:
--

 Summary: Add ability to order by reverse
 Key: TINKERPOP-2519
 URL: https://issues.apache.org/jira/browse/TINKERPOP-2519
 Project: TinkerPop
  Issue Type: New Feature
Reporter: Dave Bechberger


In addition to the current options we should add the ability to reverse the 
order of items using something like a keyword of Order.reverse.  This would 
return the reverse order of traversals flowing in.  This could be used to 
perform tasks such as reversing the order of a path:

{{ {{g.V().out().path().order(local).by(Order.reverse)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Issue Comment Deleted] (TINKERPOP-2379) Consistent defaults and initialization APIs for drivers

2021-02-04 Thread Stephen Mallette (Jira)


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

Stephen Mallette updated TINKERPOP-2379:

Comment: was deleted

(was: Might also be worth considering configurations from a file. Java allows 
that but other drivers do not.)

> Consistent defaults and initialization APIs for drivers
> ---
>
> Key: TINKERPOP-2379
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2379
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: driver
>Affects Versions: 3.4.6
>Reporter: Stephen Mallette
>Priority: Minor
>
> Some drivers allow the connection URL to be directly set which means that it 
> is wholly configurable. For example, Javascript allows:
> {code}
> const g = traversal().withRemote(new 
> DriverRemoteConnection('ws://localhost:8182/gremlin'));
> {code}
> Python allows something similar, but Java and .NET do not. I don't recall a 
> reason for that inconsistency and there are times when it seems that such 
> options would be helpful.
> In addition, some drivers will take a file for configuration and some will 
> not. Furthermore, defaults for various settings are different from one driver 
> to the next. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (TINKERPOP-2379) Consistent defaults and initialization APIs for drivers

2021-02-04 Thread Stephen Mallette (Jira)


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

Stephen Mallette updated TINKERPOP-2379:

Description: 
Some drivers allow the connection URL to be directly set which means that it is 
wholly configurable. For example, Javascript allows:

{code}
const g = traversal().withRemote(new 
DriverRemoteConnection('ws://localhost:8182/gremlin'));
{code}

Python allows something similar, but Java and .NET do not. I don't recall a 
reason for that inconsistency and there are times when it seems that such 
options would be helpful.

In addition, some drivers will take a file for configuration and some will not. 
Furthermore, defaults for various settings are different from one driver to the 
next. 

  was:
Some drivers allow the connection URL to be directly set which means that it is 
wholly configurable. For example, Javascript allows:

{code}
const g = traversal().withRemote(new 
DriverRemoteConnection('ws://localhost:8182/gremlin'));
{code}

Python allows something similar, but Java and .NET do not. I don't recall a 
reason for that inconsistency and there are times when it seems that such 
options would be helpful.


> Consistent defaults and initialization APIs for drivers
> ---
>
> Key: TINKERPOP-2379
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2379
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: driver
>Affects Versions: 3.4.6
>Reporter: Stephen Mallette
>Priority: Minor
>
> Some drivers allow the connection URL to be directly set which means that it 
> is wholly configurable. For example, Javascript allows:
> {code}
> const g = traversal().withRemote(new 
> DriverRemoteConnection('ws://localhost:8182/gremlin'));
> {code}
> Python allows something similar, but Java and .NET do not. I don't recall a 
> reason for that inconsistency and there are times when it seems that such 
> options would be helpful.
> In addition, some drivers will take a file for configuration and some will 
> not. Furthermore, defaults for various settings are different from one driver 
> to the next. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (TINKERPOP-2379) Consistent defaults and initialization APIs for drivers

2021-02-04 Thread Stephen Mallette (Jira)


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

Stephen Mallette updated TINKERPOP-2379:

Summary: Consistent defaults and initialization APIs for drivers  (was: 
Ensure that all driver URL paths are configurable)

> Consistent defaults and initialization APIs for drivers
> ---
>
> Key: TINKERPOP-2379
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2379
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: driver
>Affects Versions: 3.4.6
>Reporter: Stephen Mallette
>Priority: Minor
>
> Some drivers allow the connection URL to be directly set which means that it 
> is wholly configurable. For example, Javascript allows:
> {code}
> const g = traversal().withRemote(new 
> DriverRemoteConnection('ws://localhost:8182/gremlin'));
> {code}
> Python allows something similar, but Java and .NET do not. I don't recall a 
> reason for that inconsistency and there are times when it seems that such 
> options would be helpful.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (TINKERPOP-2518) Enhance .NET gherkin framework to deal with more advanced assertions

2021-02-04 Thread Stephen Mallette (Jira)
Stephen Mallette created TINKERPOP-2518:
---

 Summary: Enhance .NET gherkin framework to deal with more advanced 
assertions
 Key: TINKERPOP-2518
 URL: https://issues.apache.org/jira/browse/TINKERPOP-2518
 Project: TinkerPop
  Issue Type: Improvement
  Components: dotnet
Affects Versions: 3.5.0
Reporter: Stephen Mallette


There are two pull requests which introduced some "ignores" for tests in .NET:

https://github.com/apache/tinkerpop/pull/1383
https://github.com/apache/tinkerpop/pull/1387

In both cases the Gremlin seems to work fine but the assertions aren't robust 
enough in the framework to handle the results (i think). We should try to 
settle this before 3.5.0 release.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2452) DotNetTranslator for Java

2021-02-04 Thread ASF GitHub Bot (Jira)


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

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

spmallette opened a new pull request #1387:
URL: https://github.com/apache/tinkerpop/pull/1387


   https://issues.apache.org/jira/browse/TINKERPOP-2452
   
   Added `DotNetTranslator`. Refactored the tests to use translator to generate 
the test traversals. There are some tests I had to ignore but that's not 
because they fail due to incorrect functionality...they are failing because of 
how the assertions work. I will create an issue to deal with that.
   
   All tests pass with `docker/build.sh -t -n -i`
   
   VOTE +1



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> DotNetTranslator for Java
> -
>
> Key: TINKERPOP-2452
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2452
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: translator
>Affects Versions: 3.4.8
>Reporter: Stephen Mallette
>Priority: Major
>
> Add a {{DotNetpTranslator}} to Java to translate Gremlin into C#. This one 
> may be tricky given the need to often specify generics in C#. Of course, even 
> if the implementation got someone most of the way to a translation and they 
> had to specify the generics themselves it would be considerably less work 
> than what they are in store for today.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Javascript Gremlin driver and AWS Lambda connection issues

2021-02-04 Thread Ian Robinson
I've been working on an AWS Lambda/Javascript Gremlin driver issue for the
last couple of weeks, and have run out of ideas around how to fix it, and
wondered whether anyone on this list had any suggestions.

What I'm seeing is that long-lived Websocket connections to Amazon Neptune
– connections that survive across multiple invocations of a Lambda function
– can sometimes terminate abruptly. When this happens, the Gremlin query
being executed by the Javascript driver in a Lambda function fails silently
– it doesn't throw an exception or return a promise. The Lambda function
completes with 200 OK, but an empty response payload. From the perspective
of the client invoking the function, the function appears to have executed
successfully, but with no results.

The problem of connections from a Lambda function terminating abruptly
isn't confined to the Javascript Gremlin driver. The Java and Python
drivers, however, raise exceptions that allow the function to apply some
backoff-and-retry logic. The Javascript driver, in contrast, doesn't raise
anything that can be used to trigger some retry logic. The query just
'disappears'.

In the Javascript driver I've traced this down to the underlying socket
being closed with an ECONNRESET error. The Websocket is then closed, and
emits a 'ws close' event, but there's nothing in the driver to handle this
event in a way that would provoke an exception in the promise returned by a
query. But this all seems to happen _after_ the driver sends a query to the
server. I see the bytecode generated by the query being sent to the
Websocket, and even a frame being submitted by the Websocket to its sender,
but after that, the close event, and nothing.

The frequency with which this happens is very low: it may only happen a
couple of times per day, even in situations where I'm invoking the function
several hundred times per second. The reproducer at the moment,
unfortunately, is tied to a suite of long-running Lambda/Neptune tests.

Have you seen anything like this before? I think further diagnosis will
benefit from someone who knows Nodejs's network stack and callback/promise
model and the Javascript driver better than I do.

Thanks

ian