[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16164879#comment-16164879 ] stephen mallette commented on TINKERPOP-1474: - ok - true - we could probably make that section more clear > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg >Assignee: stephen mallette > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16164873#comment-16164873 ] Kevin Gallardo commented on TINKERPOP-1474: --- re: GraphSON: The GraphSON spec [as detailed here|http://tinkerpop.apache.org/docs/3.3.0/dev/io/#_vertex_3] mentions properties being serialized as part of the Vertex and that's what I was referring to If Tinkerpop were to decide that properties are fully separate from Vertex then the GraphSON spec should reflect it, since in GraphSON there is no notion of "g:DetachedVertex" or "g:ReferenceVertex" - everything is Vertex, so the serialization specs should align with that I think. About properties, (I know this is a long term goal and you're still only thinking about it but) to me it seems the most natural that Properties get serialized separately from Vertices and Edges and simply contain a reference (ID) to their parent element to allow re-attaching to it. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg >Assignee: stephen mallette > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16164827#comment-16164827 ] stephen mallette commented on TINKERPOP-1474: - > So the only way to gather properties will be explicitly through the traversal > then Yes - i think it is analogous to standard SQL practices where you typically don't do {{select * from table}}. you only request the fields that you want - same premise for gremlin and graphs. there were a number of discussions on this in the dev list where consensus always seemed to settle on not trying to implement property support across glvs so I figured this one didn't need to stay open any longer. > Just realized that the GraphSON specification will need to be updated once > that happens. again - not something that would happen any time soon. no one every sounded in favor of doing a takeaway of from the java folks who are still getting properties, so I don't know that GraphSON's spec needs to change. Also, GraphSON is still a file storage format for a full graph so properties still need to be serializable in that sense. there still are some odd sticking points in my mind, like what constitutes a subgraph with respect to properties (not that GLVs can work with those directly anyway, which seems like a major missing piece of functionality in my mind). Anywayall stuff for the future > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg >Assignee: stephen mallette > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16164774#comment-16164774 ] Kevin Gallardo commented on TINKERPOP-1474: --- So the only way to gather properties will be explicitly through the traversal then, I guess, interesting. Makes sense to me. Just realized that the GraphSON specification will need to be updated once that happens. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg >Assignee: stephen mallette > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16164753#comment-16164753 ] stephen mallette commented on TINKERPOP-1474: - > so is the goal for the Java GLV to have the Vertex class be removed of its > Properties methods? If we're talking about a distant future for TinkerPop 4.x then, yes, there will only be reference vertices/edges. For now, in TinkerPop 3.x I think we've gone too far down the path of enabling properties in Java to ever really take them away. We can only hide them via TINKERPOP-1701 and encourage users to think property-less. I think we just want to align 3.x with the idea of where things are headed further in the future. So the discrepancy of properties will basically remain between java and python, js, etc, but we will likely shift defaults over time to not include properties for Java (with java users having the option to go back to including properties if they like as a method of backward compatibility). > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg >Assignee: stephen mallette > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16164742#comment-16164742 ] Kevin Gallardo commented on TINKERPOP-1474: --- [~spmallette] so is the goal for the Java GLV to have the Vertex class be removed of its Properties methods? Like {{v.property('name')}}, etc etc I think the issue here was more about the Graph {{structure}} objects like Vertex, Edge, and so on which do not have a properties in the class definition itself. In Java, whether the object sent over the wire is a Detached or Reference element, the object returned by the Tinkerpop API always extends Vertex, which has an API for properties even though if the object sent is a Reference, calling to properties will return empty results. In the Python GLV, currently whether a Vertex sent is Detached or Reference, the Vertex class does not have an API to gather properties out of the Vertex. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg >Assignee: stephen mallette > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16051872#comment-16051872 ] stephen mallette commented on TINKERPOP-1474: - I think we'll ultimately solve this one with TINKERPOP-1592 by letting users better specify the detachment model. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io, language-variant >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15705625#comment-15705625 ] ASF GitHub Bot commented on TINKERPOP-1474: --- Github user spmallette commented on the issue: https://github.com/apache/tinkerpop/pull/490 yes - i think you can close this one since the work is already underway elsewhere. thanks for submitting this though. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io, language-variant >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15705609#comment-15705609 ] ASF GitHub Bot commented on TINKERPOP-1474: --- Github user bjmoor commented on the issue: https://github.com/apache/tinkerpop/pull/490 It looks like the work being done in TINKERPOP-1565 will be addressing the issue which this PR was attempting to address, and probably in a more effective manner. Should I just close this PR? > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io, language-variant >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15705219#comment-15705219 ] stephen mallette commented on TINKERPOP-1474: - i linked this over to TINKERPOP-1565 as this issue fits under the total body of this GraphSON/GLV work > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io, language-variant >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15705209#comment-15705209 ] ASF GitHub Bot commented on TINKERPOP-1474: --- Github user spmallette commented on the issue: https://github.com/apache/tinkerpop/pull/490 @okram pinged me on the side and filled me in with some background info i wasn't aware of - the short of it is that a lot of work has been done in this area on the aforementioned tickets and if you'd like to contribute you should probably coordinate with those working on TINKERPOP-1565 at this point. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io, language-variant >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15705116#comment-15705116 ] ASF GitHub Bot commented on TINKERPOP-1474: --- Github user spmallette commented on the issue: https://github.com/apache/tinkerpop/pull/490 TINKERPOP-1420 has merged to master. @bjmoor do you want to rebase your PR? note this area of development is still somewhat in flux on master given: https://issues.apache.org/jira/browse/TINKERPOP-1565 Perhaps the best option would be to target this work at the tp32 branch where GraphSON 2.0 is stable. wdyt? > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io, language-variant >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15674779#comment-15674779 ] ASF GitHub Bot commented on TINKERPOP-1474: --- Github user okram commented on the issue: https://github.com/apache/tinkerpop/pull/490 Dah. I didn't see this ticket. I'm doing this (along with other things) in TINKERPOP-1520. Hmm... perhaps you can provide a PR to that branch ... In particular your test cases. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io, language-variant >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15663546#comment-15663546 ] ASF GitHub Bot commented on TINKERPOP-1474: --- Github user spmallette commented on the issue: https://github.com/apache/tinkerpop/pull/490 Thanks for this. Would you mind including tests for `Edge` and `VertexProperty`? Also, could you please edit your PR to have TINKERPOP-1474 as the prefix to the rest of your text in the name as in: "TINKERPOP-1474 GraphSON decode of Vertex and Edge properties" This change applies to that ticket I think. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io, language-variant >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15630039#comment-15630039 ] Kevin Gallardo commented on TINKERPOP-1474: --- It sounds important to make the distinction between what is exposed through the API and what is the data that is actually being sent to clients. On one side there needs to be a distinction between when the server returns an Element with its properties and when it does not, based on the type of Traversal (OLAP or not) and the configuration of the Gremlin server. However, at least for the Gremlin-Java what is exposed is always the same, the high level element interface ({{Vertex}}/{{Edge}}), which has properties methods, and whether what the server sent was a ReferenceElement, or a DetachedElement, the API will not change for the client. The methods to get properties will either return the properties if they were sent, or something empty if they weren't and that will not break users code. It also sounds important that the GLVs follow the same path in order to achieve the general rule of thumb [stated in the reference doc|http://tinkerpop.apache.org/docs/current/reference/#gremlin-variants]: bq. A strong correspondence between variants ensures that the general Gremlin reference documentation is applicable to all variants and that users moving between development languages can easily adopt the Gremlin variant for that language. The Graph structure types are already exposed through the python Gremlin variant, so it sounds like they should be for the other GLVs and in my opinion we should try to make it as consistent as possible. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Improvement > Components: io, language-variant >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15615735#comment-15615735 ] stephen mallette commented on TINKERPOP-1474: - I'm coming around to the side where I think we should include the properties. As I mentioned in my comment below, it doesn't seem like a lot of code to add. We would draw the line at reading the properties. I will start a thread on the dev list (and link it here) to make sure the community is on-board with this direction. [~okram] may still not like the idea though. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Bug > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15615674#comment-15615674 ] Andy Tolbert commented on TINKERPOP-1474: - Just to follow up on this to make sure it doesn't slide off the radar, can I get some clarification on this? {quote} is deserializing gremlin bytecode into objects (vertex, edge, vertexproperty, etc.) outside the scope of gremlin-python? {quote} Mostly just looking for clarification for future GLV implementations. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Bug > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15601813#comment-15601813 ] Andy Tolbert commented on TINKERPOP-1474: - I think that is a key point that isn't really clear to me. So is deserializing gremlin bytecode into objects (vertex, edge, vertexproperty, etc.) out of scope of gremlin-python then? > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Bug > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15597614#comment-15597614 ] stephen mallette commented on TINKERPOP-1474: - I was a bit surprised that [~dmill] and [~davebshow] weren't interested in seeing properties in the GLVs. This issue is so weird. I feel like I've argued for both sides of the fence on it. We've determined that Gremlin Server will, as a configuration per request, return properties or not. We seemed to be going down the path where the default would be to not return properties as for 3.3.0 and that there would be an option to include properties per request. So from the server perspective the data is available if a GLV wanted to provide it. It does seem incongruent that the java version of {{withRemote}} has the ability to deal with properties (even if that won't be the future default) but the other language variants will not. It don't think that there is much more code to manage to have the properties on those GLV structure classes. I would think that we would draw the line at these classes being read-only of course. It's not as though you would implement {{Vertex.addEdge()}} or those types of methods. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Bug > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15596703#comment-15596703 ] Marko A. Rodriguez commented on TINKERPOP-1474: --- It is not suppose to have implementations as there is no Gremlin-Python VM. Gremlin-Python is only a language variant to generate Gremlin bytecode to send to Gremlin-Java VM. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Bug > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15596587#comment-15596587 ] Andy Tolbert commented on TINKERPOP-1474: - I also noticed that in {{gremlin-python}} that {{VertexProperty}} also doesn't have {{properties}} itself, so if you have a property with meta-properties they will not be accessible with GLV. I assume this is a similar line of reasoning to {{Vertex}} and {{Edge}} not having properties, but I thought I would point that out as well. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Bug > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15586586#comment-15586586 ] Andy Tolbert commented on TINKERPOP-1474: - Some questions, just because I think it would be good to clarify these points: 1. [The thread|https://lists.apache.org/thread.html/Z9harwx59p9gj9t] referenced in [~spmallette]'s comment seems to indicate the behavior of whether or not the properties are present would be configurable in some way: {quote} https://lists.apache.org/thread.html/5a04893d04b6b9f8f33c163f471bcdee18cc8e23d59b02a8f591a47b@1463679213@%3Cdev.tinkerpop.apache.org%3E Just to check, will it be configurable, returning a ReferenceVertex or the Vertex together with its properties? {quote} {quote} https://lists.apache.org/thread.html/17ad6d1a9583ef9080be6b8b10b83cc60a971236b4d42f957411af99@1463679388@%3Cdev.tinkerpop.apache.org%3E The intent is for it be configurable by a new "mime type" so it would end up configurable per request. Obviously, if you do an OLAP query and all you get is a ReferenceVertex then your request for a an "upgrade" to a DetachedVertex (with properties) would go unanswered. {quote} However [~okram] says in this thread: {quote} My personal thinking on this is that if you didn't query for that data, you don't get that data. That is, ReferenceXXX by default. I think it is an overkill for GLV designers/maintainers to have to now have Vertex implementations with multi-/meta-properties, etc. It would be to the point where the GLV structure API is nearly as rich as the Java API thats alot of code. {quote} Given this, is the decision not to include properties on the {{Edge}} and {{Vertex}} objects in GLV? 2. The {{Edge}} implemenation in gremlin-python lacks {{inVLabel}} and {{outVLabel}}, will these always be present or not? In any case should it be included in the {{Edge}} implementation? > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Bug > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15537949#comment-15537949 ] Dylan Millikin commented on TINKERPOP-1474: --- I'm less torn about this now that GLVs are around the corner. It makes everything a little simpler for everyone and the extra consistency would be welcome. I'm just going to point out that I believe {{valueMap(true)}} on edges does not currently return {{inV/outV}}. If we go the {{Reference*}} route it would be nice to have those added in. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Bug > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15526572#comment-15526572 ] David M. Brown commented on TINKERPOP-1474: --- I'm not particularly worried about the change to returning {{Reference*}} elements--it seems logical to me. The Goblin OGM does require element properties to be returned, but I believe that we can just use the {{valueMap(true)}} step to get back everything we need. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Bug > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15525977#comment-15525977 ] Marko A. Rodriguez commented on TINKERPOP-1474: --- I don't remember {{with('name')}}. My personal thinking on this is that if you didn't query for that data, you don't get that data. That is, {{ReferenceXXX}} by default. I think it is an overkill for GLV designers/maintainers to have to now have {{Vertex}} implementations with multi-/meta-properties, etc. It would be to the point where the GLV structure API is nearly as rich as the Java API thats alot of code. > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Bug > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1474) API Alignment Between Java Gremlin Graph Structure and GLVs
[ https://issues.apache.org/jira/browse/TINKERPOP-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15525889#comment-15525889 ] stephen mallette commented on TINKERPOP-1474: - The return of {{DetachedVertex}} was a historical decision going back to Rexster in TinkerPop 2.x (which returned properties first for REST and then also for its binary protocol). We basically continued in that way for TinkerPop 3.x. In the last six to twelve months though, we've seen need to change that such that we don't return properties anymore for requests that return Graph elements (vertices/edges). There area number of reasons for that, but two primary ones are: 1. Consistency with OLAP which returns {{Reference*} elements 2. Vertices with multi-properties which could return millions of properties per vertex potentially would be expensive to gather/serialize. So - ultimately, you wouldn't {{g.V()}} to return properties anymore than you would want "select * from table" to return them. You'd specifically query the properties that you wanted. We are currently stuck in a transitional period for going to use {{Reference*}} elements across the board. To do so immediately would break lots of users who are depending on properties to be present. This was discussed here: https://lists.apache.org/thread.html/Z9harwx59p9gj9t Note that consensus was not reached on not returning properties by default (a decision delayed for later), though, given the two reasons for doing so listed above, I'm not sure how we could not go that direction. We took a step towards implementing "returning {{Reference*}} on TINKERPOP-1308, but only for Gryo. I think we need to look to make the change on this for 3.3.0 when we will allow "larger" breaking changes. For users this would mean that they would have to manually switch to a different serializer as the default would change to return the {{Reference*}} instead of {{Detached*}}. I also think this work needs to be done at a serializer-level, because simply implementing a different "detach" mechanism in {{HaltedTraverserStrategy}} won't properly detach an {{Element}} unless the {{Traverser}} contains the {{Element}} - if it were {{List}} we would still get properties. If this logic were part of the serializer then the entire object tree of a {{Traverser}} is considered and detachment would occur properly. I also think doing it at a serializer level, yields greater flexibility as the client can choose via mime-type which behavior (properties or no properties) they want at the time of a request. For completeness of the thinking, we had once wondered if the Gremlin language itself couldn't be expanded to allow for something like: {code} g.V().with('name') {code} In this way, the user could be explicit about the properties to populate to a {{Vertex}}. I think we'd envisioned that something like {{with('name')}} would trigger the detachment at that step and from that point forward, users could only interact with the {{Vertex}} based on those properties requested. I don't remember why we said that couldn't work - [~okram] do you happen to remember? [~dmill] you were the only other person who contributed on that thread i referenced above - any new thoughts on this? [~davebshow] this would affect gremlin-python, goblin, etc. - concerns? > API Alignment Between Java Gremlin Graph Structure and GLVs > --- > > Key: TINKERPOP-1474 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1474 > Project: TinkerPop > Issue Type: Bug > Components: io >Affects Versions: 3.2.2 >Reporter: Adam Holmberg > > The current Java GraphSON implementation and that in the Python GLV leave > some question about what *should* be returned from a simple traversal like > `g.V()`. > The java implementation presently assumes that properties could be present > and returns a DetachedVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433 > The python implementation assumes no such thing and returns something more > reminiscent of a ReferenceVertex: > https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242 > Is the java version overreaching, and should not expect properties unless a > step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or > should the Python version be expanded? > Is there something we can do to establish guidelines for this, and align > these APIs? -- This message was sent by Atlassian JIRA (v6.3.4#6332)