Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the TinkerPop implementation to connect to a Gaffer rest api #277

Closed
p013570 opened this issue Jun 22, 2016 · 2 comments
Closed

Enable the TinkerPop implementation to connect to a Gaffer rest api #277

p013570 opened this issue Jun 22, 2016 · 2 comments
Assignees

Comments

@p013570
Copy link
Member

p013570 commented Jun 22, 2016

No description provided.

@p013570 p013570 added enhancement Improvement to existing functionality/feature p:high labels Jun 22, 2016
@p013570 p013570 self-assigned this Jun 29, 2016
@p013570 p013570 modified the milestone: Backlog Jul 6, 2016
@okram
Copy link

okram commented Oct 18, 2016

I would recommend binding it via the Java API. That is, implement the following interfaces in TinkerPop:

Graph: https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
Vertex: https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Vertex.java
VertexProperty: https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexProperty.java
Edge: https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Edge.java
Property: https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Property.java

That is about 90% of the effort required. After that, to make things solid:

  1. Connect it to the StructureStandardSuite and ProcessStandardSuite. You can see how this is done via TinkerGraph: https://github.com/apache/tinkerpop/blob/master/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphStructureStandardTest.java and https://github.com/apache/tinkerpop/blob/master/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/TinkerGraphProcessStandardTest.java
  2. Add a TraversalStrategy to use index lookups. I assume you have fast lookups for stuff like "get me all vertices with name 'marko'." If so, then you will need something like TinkerGraphStepStrategy (https://github.com/apache/tinkerpop/blob/master/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategy.java) where your GafferGraphStep implementation will use the HasContainers accordingly to do index lookups -- e.g. g.V().has('name','marko').

That is really all there is to it. I suspect a solid 1 week effort and you will then be able to use Gremlin to query your graph.

http://tinkerpop.apache.org/gremlin.html

Hope that helps.

@p013570
Copy link
Member Author

p013570 commented Oct 18, 2016

Thanks again for your help. As you saw we have a very basic implementation over in the Gaffer Tools Repository.

The current implementation was written just to investigate if and how it might be done and is still very much a prototype. Unfortunately we just haven't had chance to tidy it up and implement the extra bits. As you mentioned, we do really need to make use of TraversalStrategies to optimise it for Gaffer.

I'll close this issue and reopen a similar one in the gaffer tools repo with your ideas.

@p013570 p013570 closed this as completed Oct 18, 2016
@p013570 p013570 added invalid and removed enhancement Improvement to existing functionality/feature p:high labels Oct 18, 2016
@p013570 p013570 modified the milestone: Backlog Oct 19, 2016
c015dariu pushed a commit to c015dariu/Gaffer that referenced this issue Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants