Giter Club home page Giter Club logo

graph-databases-use-cases's Introduction

Graph Databases Use Cases

Example use case implementations from the O'Reilly book Graph Databases by @iansrobinson, @jimwebber and @emileifrem.

Setup

This repository contains a submodule, neode, which is used to build the performance datasets. After cloning the repository, you will need to initialize the submodule:

git submodule init

and then:

git submodule update

To run the use case queries:

mvn clean install

Overview

Queries are developed in a test-driven fashion against small, well-known representative graphs (as described pp.83-87 of the book). The queries can then be run against a much larger, randomly-generated graph (typically, 1-2 million nodes and several million relationships), to test their relative performance. (Note: these performance tests do not test production-like scenarios; rather, they act as a sanity check, ensuring that queries that run fast against a very small graph are still reasonably performant when run against a larger graph.)

The project contains 3 modules (in addition to the neode submodule):

  • queries

    Contains the use case queries and the unit tests used to develop the queries.

  • dataset_builders

    Builds larger, randomly-generated sample datasets.

  • performance_tests

    Runs the queries against the large sample datasets.

Running the Performance Tests

First, build the project as described in Setup.

Before you run the performance tests you will need to generate sample datasets. To create a sample dataset run:

mvn test -pl data-generation -DargLine="-Xms2g -Xmx2g" -Dtest=AccessControl|Logistics|SocialNetwork

For example, to generate a sample dataset for the Logistics queries, run:

mvn test -pl data-generation -DargLine="-Xms2g -Xmx2g" -Dtest=Logistics

WARNING: Building the sample datasets takes a long time (several tens of minutes in some cases).

To execute the performance tests against a sample dataset, run:

mvn test -pl performance-testing -DargLine="-Xms2g -Xmx2g" -Dtest=AccessControl|Logistics|SocialNetwork

graph-databases-use-cases's People

Contributors

iansrobinson avatar jexp avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.