JanusGraph / janusgraph

JanusGraph: an open-source, distributed graph database
https://janusgraph.org
Other
5.33k stars 1.17k forks source link

Unidirected hyper-edges not working as documented #675

Open pluradj opened 7 years ago

pluradj commented 7 years ago

Reference from janusgraph-users. Related documentation.

It seems like this functionality worked in older Titan releases, but has not been working since Titan 0.9.0-M2. There must not be any JUnit test cases covering this either.

automathman commented 7 years ago

the only info I've found so far about Titan's support was here: https://github.com/thinkaurelius/titan/issues/860 I know that titan did not export them properly to graphson, but it did not seem like a un-fixable problem. Not sure I buy the "incorrect ID's" argument.

In titan 0.5.x this was supported by special methods in TitanRelation Interface, and it's implementing class(es) : setProperty(EdgeLabel label, TitanVertex vertex)

automathman commented 7 years ago

I've found this feature very useful for some of my graph models, because I can update a pointer to a vertex without deleting/adding an edge (avoiding potential cassandra tombstone issues for "hot" data), and in concurrent operations I do not end up with multiple "pointers" as I would with addEdge workflows

pluradj commented 7 years ago

Thanks for the pointer @automathman. Based on that Titan issue, we'll handle this as an enhancement request, as the functionality was dropped in Titan 1.0.

robertdale commented 7 years ago

There are tests for this. It should be verified that they are executing and passing (or not passing).
https://github.com/JanusGraph/janusgraph/blob/master/janusgraph-test/src/main/java/org/janusgraph/graphdb/JanusGraphTest.java#L459

pluradj commented 7 years ago

Those tests define the unidirected edges in the schema, but there aren't any tests actually exercise creating elements using it in the same fashion as described in the documented example.

robertdale commented 7 years ago

Oh, I think I see the confusion I have. I think the title is misleading. Unidirected edges work and there are tests for it [1]. Unidirected edges as hyper-edges (stored in a property) don't work and there is actually a test that should fail for this condition [2].

  1. https://github.com/JanusGraph/janusgraph/blob/master/janusgraph-test/src/main/java/org/janusgraph/graphdb/JanusGraphTest.java#L859

  2. https://github.com/JanusGraph/janusgraph/blob/master/janusgraph-test/src/main/java/org/janusgraph/graphdb/JanusGraphTest.java#L895

automathman commented 6 years ago

where would I track progress on the "enhancement request" - here? or is there another ticket/issue?

The-Don-Himself commented 6 years ago

I'm also very interested in this and have subscribed to this issue, I think @automathman a possible way to track this issue is to monitor chatter on the JanusGraph developers group and the JanusGraph users group.

I have this daunting feeling that this is really an edge case (but one that sets JanusGraph apart from other Graph DBs) so it might take some time before it moves to the top of the impending features list but I could be wrong. Perhaps @pluradj and @robertdale can shed more light on this.

pluradj commented 6 years ago

@automathman We can continue to track the enhancement request with this issue. For now, all that is being done is removing the documentation that doesn't reflect reality.

I think it might be interesting to hear a perspective from @fppt on hyperedges.