gjrwebber / spring-data-gremlin

Spring data gremlin makes it easier to implement Graph based repositories. This module extends Spring Data to allow support for potentially any Graph database that implements the Tinkerpop Blueprints 2.x API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create GremlinTemplate

gjrwebber opened this issue · comments

Create OrientDBTemplate inline with other Spring data projects which offer this paradigm.

Hi Gjrwebber,
Can you work first on this item. I am migrating my project to use your framework, So I am thinking about this.

I'll take a look to see what is involved and get back to you.

I have added OrientObjectTemplate OrientDocumentTemplate on the feature/#22_OrientTemplate branch. I have copied these straight from https://github.com/orientechnologies/spring-data-orientdb so there is no guarantee they work.

Also, for the record, I am not sure this belongs in this project.

Hi Gjrwebber,

OrientDBTemplate, which we should be follow to concepts on Graph. OrientObjectTemplate OrientDocumentTemplate in "spring-data-orientdb" project are specify to Document and Object, it is not Graph. I don't like that concepts and it is not belong your project.

OrientDBTemplate should be follow to concepts as methods in GremlinRepository and combine with some method for relationship (which you call it is edge). as in Neo4jTemplate you can view all methods of it, only support as Node Repository and Relationship Repository (query, travel, create, delete, update, ... only for graph concepts). You can ref http://docs.spring.io/autorepo/docs/spring-data-neo4j/3.0.0.M1/api/org/springframework/data/neo4j/support/Neo4jTemplate.html.

I think OrientDBTemplate is very usage if you define as Neo4jTemplate. (not implement as OrientDocumentTemplate and OrientObjectTemplate).

In OrientDBTemplate, you only use OrientGraph api, which can help you implement all method in graph concepts (https://orientdb.com/docs/last/Graph-Database-Tinkerpop.html)

So, do you think that something more like GremlinTemplate is more suitable to this project? Since that this is basically a Gremlin abstraction for Spring Data, not just for OrientDB.

What specifically would you use this Template for?

Right, GremlinTemplate, not Orient ot Titan. Thanks.

Hi Huy, what specific methods would you like to see in GremlinOperations?