This is a getting started guide for running a Titan graph database using Node.js and Gremlin.
What is Gremlin? A few open source tools that help you interact with graph databases. It allows you to avoid lock-in by switching seamlessly between different graph databases. Neo4j, Titan, OrientDB, and ArangoDB all support it. The Gremlin tools that you probably care about are the query language (the green creature in the picture above) and the HTTP server (called Rexster, that's the yellow dog).
Run Titan
git clone https://github.com/oren/titan.git cd titan bin/run
Runs 3 Docker containers: Titan, ElasticSearch, (Indexing) and Cassandra (Storage). The HTTP server runs on port 8182.
(Note - You need to have docker installed. If you are on Mac you'll need to modify index.js to use the IP you get from boot2docker or docker-machine.)
Interact with the Database
node index.js
Let's look at the nodes (also called vertices) in our database: curl http://localhost:8182/graphs/graph/vertices
This is a getting started guide for running a Titan graph database using Node.js and Gremlin.
What is Gremlin? A few open source tools that help you interact with graph databases. It allows you to avoid lock-in by switching seamlessly between different graph databases. Neo4j, Titan, OrientDB, and ArangoDB all support it. The Gremlin tools that you probably care about are the query language (the green creature in the picture above) and the HTTP server (called Rexster, that's the yellow dog).
Run Titan
git clone https://github.com/oren/titan.git
cd titan
bin/run
Runs 3 Docker containers: Titan, ElasticSearch, (Indexing) and Cassandra (Storage). The HTTP server runs on port 8182.
(Note - You need to have docker installed. If you are on Mac you'll need to modify index.js to use the IP you get from boot2docker or docker-machine.)
Interact with the Database
node index.js
Let's look at the nodes (also called vertices) in our database:
curl http://localhost:8182/graphs/graph/vertices
And now for the edges:
curl http://localhost:8182/graphs/graph/edges
This code uses grex, the Rexster client for Node.js. It's a
request
package wrapper that adds a few higher level functions.The following lines are all that are required to create two vertices and an edge:
Resources