Especially in the Internet world, the graph calculation is getting more and more people's attention, and the graph computation related software is also more and more abundant. This article will quickly demonstrate Titan's graph database for this open source.
Note: This article is mainly based on Titan's official two documents:
-Http://s3.thinkaurelius.com/docs/titan/0.5.0/arch-overview.html
-Http://s3.thinkaurelius.com/docs/titan/0.5.0/getting-started.html
1. Architecture
Titan's architecture diagram is very clear, so this article is only a few things to repeat:
A. Titan's data needs to exist in a database, and the user can choose from several databases:
-Cassandra
-HBase
-BerkeleyDB
B. The implementation of the Titan bottom requires index support:
-Elasticsearch
-Lucene
C. The user can access Titan in two types of ways:
-Java API
-Blueprints-based Tinkerpop stack tools, such as:
-The Gremlin Query language
-The Rexster graph server
2. Installation
After understanding the Titan architecture, installation and configuration becomes relatively easy. Before using Titan, you need to configure the information about HBase and Elasticsearch in Titan and ensure that the two services are in the boot state. The database that is used in my environment is hbase.
3. Access to Titan via Gremlin
A. Enter the Gremlin command line: Execute ${titan_home}/bin/gremlin.sh
B. Import the "Map of the Gods" example library into the database for the next attempt
First, it is possible to understand the specific content contained in the Atlas of the Gods:
Create a graph instance by command ' G = titanfactory.open (' conf/titan-hbase-es.properties ') '. After executing the command, a table named ' Titan ' will be created in the HBase database with the following:
Import the map of the gods into the database by command ' graphofthegodsfactory.load (g) '. After the lead, the HBase Titan table will add a lot of rows of data.
Now it's easy to take advantage of the features provided by Gremlin to traverse the gallery. is part of the example, interested friends can find more commands and do experiments from the official website Doc.
Figure Database Titan Quick Start