Apache TinkerPop 3 Graph Structure Implementation for OrientDB. This started off as just a proof of concept, but thanks to a lot of help it's now in a really good shape.
Warning: While this is (as of now) the only Apache TinkerPop3 graph structure implementation for OrientDB, it's not the
official one - it's not supported by the Orient team. The contributors focused on the functionality needed for their use cases, and it doesn't claim to be complete.
UPDATE: since Nov 2016 OrientDB team started a process to officially support this module. A stable and supported release will be announced in the near future.
The main area that need some more work is index lookups - currently it does find the right index for a simple case, e.g.
g.V.hasLabel("myLabel").has("someKey", "someValue"). However if there are multiple indexes on the same property, or if there the traversal should better use a composite index, that's not handled well yet. If you feel inclined you can add these cases to the
OrientGraphIndexTest.java. The function that looks up indexes is
- you can run the standard Apache TinkerPop test suite with
mvn install -P release
- there are some additional tests that you can run independently with
- additionally there is a separate suite of tests in the
tests-scaladirectory which you can run using
- to automatically format the code (travis CI enforces a format check), just run
mvn clean install
Have a look at the tests-scala which demonstrates the usage. There's also an orientdb example project in gremlin-scala-examples.
Labels and classes
Vertices and Edges are stored as classes based on their label. In order to allow vertices and edges to use the same label, the implementation prepends
E_ in the class name:
- vertex with label
- edge with label
You might want to use orientdb-migrations to create a schema with indexes etc.
- upgrade version: remove SNAPSHOT (driver/pom.xml and tests-scala/build.sbt)
- commit on branch, push, create PR on github
- await green light from travis
- merge PR on github
- mvn pull
- mvn clean deploy -Prelease
- git tag VERSION
- bump versions to next SNAPSHOT (pom.xml, build.sbt)
- git push
- git push --tags