Skip to content
项目

iansrobinson/graph-databases-use-cases

在 GitHub 查看

关于

Example use cases from the O'Reilly Graph Databases book

数据与分析

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

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

探索相关项目

加载中…