GZero simplifies large scale graph-based computing, storage, and machine learning model predictions. All features and labels will be expressed as graph traversals. A user may specify the features necessary to construct a feature vector with the appropriate labels and the framework will provide an easy API for training, evaluating, and performing predictions with stored models.
Clone titan branch titan11
and run:
mvn clean install -DskipTests=true -Paurelius-release -Dgpg.skip=true
Titan 1.1 comes with cassandra and elasticsearch. Start cassandra and enable thrift, then start elasticsearch:
titan/bin/cassandra -f
titan/bin/nodetool enablethrift
titan/bin/elasticsearch
Ensure config in titan/conf/gremlin-server.yaml
is using the HttpChannelizer
to enable the REST API. You'll also want to make sure the graph properties include cassandra and elastic search. You can find an example in conf/gremlin-server.yaml
Now, start the server: bin/gremlin-server.sh
Rename src/main/resources/application.conf
and src/main/resources/logback.xml
and configure to suit your needs
Execute
sbt compile
sbt run
to start the API on port 8080.
Follow the steps above to build Titan11 branch
Create configuration files that fit your needs in src/main/resources
A debian package will be generated in the target folder that can be installed.
sbt compile
sbt publish
sbt debian:packageBin
sbt debian:publish
sudo dpkg -i target/gzero_0.0.1-SNAPSHOT_all.deb
You can now start/stop the service with sudo service gzero stop|start|restart
Create an edge. Will create verticies if they do not exist.
Request:
curl \
-H 'Content-Type: application/json' \
-X POST localhost:8080/edge \
-d '{"label":"drove", "head":{"label":"person","properties" : {"name":"Bonnie"}},"tail":{"label":"vehicle", "properties":{"name":"1932 Ford V-8 B-400 convertible sedan"}}}'
Create a vertex.
Request:
curl \
-H 'Content-Type: application/json' \
-X POST localhost:8080/vertex \
-d '{"label":"person","properties":{"name":"Clyde"}}'
Run a gremlin query against the graph.
Request:
curl \
-H 'Content-Type: application/json' \
-X GET localhost:8080/query \
-d '{"gremlin":"g.V().has(\"name\", \"Bonnie\")"}'
If you are interested in contributing and jumping into the code, start with GZeroService.scala