Skip to content

Latest commit

 

History

History
 
 

aws-blog-titan-graph-database

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Building a graph database on AWS using Amazon DynamoDB and Titan

Overview

This repository contains the code that supports the AWS Big Data Blog post of the same name.

The code is a single java class that acts as a factory for loading the sample data. The sample data is included as resource files in the projects. The data used in this sample was based on a data set provided at the Machine Learning Repository at UCL (Blanca Vargas-Govea, Juan Gabriel González-Serna, Rafael Ponce-Medellín. Effects of relevant contextual features in the performance of a restaurant recommender system. In RecSys’11: Workshop on Context Aware Recommender Systems (CARS-2011), Chicago, IL, USA, October 23, 2011).

Maven is used for building and dependency management.

Getting Started

This example populates a Titan graph database backed by DynamoDB Local using the sample data discussed in the blog post.

Build the Titan Restaurants Factory

  1. Clone the repository in GitHub.

    git clone https://github.com/awslabs/aws-big-data-blog.git
    
  2. Navigate to the aws-blog-titan-graph-database directory

  3. Run the package target to build the factory jar.

    mvn package
    

Start a Titan graph database backed by DynamoDB Local

  1. Clone the 'Amazon DynamoDB Storage Backend for Titan' repository in GitHub.

    git clone https://github.com/awslabs/dynamodb-titan-storage-backend.git
    
  2. Run the install target to copy some dependencies to the target folder.

    mvn install
    
  3. Copy the jar you built in step 3 to the './target/dependencies' directory

  4. Start DynamoDB Local in a different shell.

    mvn test -Pstart-dynamodb-local
    
  5. Run the Gremlin shell.

    mvn test -Pstart-gremlin
    
  6. Open a graph using the Titan DynamoDB Storage Backend in the Gremlin shell.

    conf = new BaseConfiguration()
    

conf.setProperty("storage.backend", "com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager") conf.setProperty("storage.dynamodb.client.endpoint", "http://localhost:4567") conf.setProperty("index.search.backend", "elasticsearch") conf.setProperty("index.search.directory", "/tmp/searchindex") conf.setProperty("index.search.elasticsearch.client-only", "false") conf.setProperty("index.search.elasticsearch.local-mode", "true") conf.setProperty("index.search.elasticsearch.inteface", "NODE") g = TitanFactory.open(conf) com.amazonaws.bigdatablog.titanrestaurants.RestaurantFactory.load(g) ```