All Projects â†’ RedisGraph â†’ Redisgraph

RedisGraph / Redisgraph

Licence: other
A graph database as a Redis module

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Redisgraph

Neo4j
Graphs for Everyone
Stars: ✭ 9,582 (+641.64%)
Mutual labels:  graph, cypher, nosql, graph-database, graphdb
NeoClient
🦉 Lightweight OGM for Neo4j which support transactions and BOLT protocol.
Stars: ✭ 21 (-98.37%)
Mutual labels:  nosql, graph-database, graphdb, cypher
Agensgraph
AgensGraph, a transactional graph database based on PostgreSQL
Stars: ✭ 1,056 (-18.27%)
Mutual labels:  nosql, graph-database, graphdb
Grakn
TypeDB: a strongly-typed database
Stars: ✭ 2,947 (+128.1%)
Mutual labels:  graph, graph-database, graphdb
Cypher.js
Cypher graph database for Javascript
Stars: ✭ 30 (-97.68%)
Mutual labels:  graph-database, graphdb, cypher
Movies Javascript Bolt
Neo4j Movies Example with webpack-in-browser app using the neo4j-javascript-driver
Stars: ✭ 123 (-90.48%)
Mutual labels:  graph, cypher, graph-database
Neo4j 3d Force Graph
Experiments with Neo4j & 3d-force-graph https://github.com/vasturiano/3d-force-graph
Stars: ✭ 159 (-87.69%)
Mutual labels:  graph, cypher, graph-database
Public-Transport-SP-Graph-Database
Metropolitan Transport Network from São Paulo mapped in a NoSQL graph database.
Stars: ✭ 25 (-98.07%)
Mutual labels:  nosql, graph-database, cypher
docs
Source code of the ArangoDB online documentation
Stars: ✭ 18 (-98.61%)
Mutual labels:  nosql, graph-database, graphdb
Janusgraph
JanusGraph: an open-source, distributed graph database
Stars: ✭ 4,277 (+231.04%)
Mutual labels:  graph, graph-database, graphdb
Redis Graph
A graph database with Cypher query language as a Redis module
Stars: ✭ 404 (-68.73%)
Mutual labels:  graph, redis, graphdb
Gremlin Scala
Scala wrapper for Apache TinkerPop 3 Graph DSL
Stars: ✭ 462 (-64.24%)
Mutual labels:  graph, graph-database, graphdb
Tinkerpop
Apache TinkerPop - a graph computing framework
Stars: ✭ 1,309 (+1.32%)
Mutual labels:  graph, graph-database, graphdb
Cog
A Persistent Embedded Graph Database for Python
Stars: ✭ 90 (-93.03%)
Mutual labels:  graph, nosql, graph-database
Movies Python Bolt
Neo4j Movies Example application with Flask backend using the neo4j-python-driver
Stars: ✭ 197 (-84.75%)
Mutual labels:  graph, cypher, graph-database
Arangodb
🥑 ArangoDB is a native multi-model database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions.
Stars: ✭ 11,880 (+819.5%)
Mutual labels:  nosql, graph-database, graphdb
Awesome Graph
A curated list of resources for graph databases and graph computing tools
Stars: ✭ 717 (-44.5%)
Mutual labels:  graph, graph-database, graphdb
Movies Java Bolt
Neo4j Movies Example application with SparkJava backend using the neo4j-java-driver
Stars: ✭ 66 (-94.89%)
Mutual labels:  graph, cypher, graph-database
Ingraph
Incremental view maintenance for openCypher graph queries.
Stars: ✭ 40 (-96.9%)
Mutual labels:  graph, cypher
R2d2 Cypher
Cypher support for the r2d2 connection pool
Stars: ✭ 8 (-99.38%)
Mutual labels:  cypher, graph-database

Release CircleCI Docker Cloud Build Status Total alerts Forum Discord

RedisGraph - A graph database module for Redis

RedisGraph is the first queryable Property Graph database to use sparse matrices to represent the adjacency matrix in graphs and linear algebra to query the graph.

Primary features:

  • Adopting the Property Graph Model
    • Nodes (vertices) and Relationships (edges) that may have attributes
    • Nodes that can be labeled
    • Relationships have a relationship type
  • Graphs represented as sparse adjacency matrices
  • Cypher as query language
    • Cypher queries translated into linear algebra expressions

To see RedisGraph in action, visit Demos.

Quickstart

  1. Docker
  2. Build
  3. Start
  4. Use from any client

Docker

To quickly tryout RedisGraph, launch an instance using docker:

docker run -p 6379:6379 -it --rm redislabs/redisgraph

Give it a try

Once loaded you can interact with RedisGraph using redis-cli.

Here we'll quickly create a small graph representing a subset of motorcycle riders and teams taking part in the MotoGP league, once created we'll start querying our data.

With redis-cli

The format of results through redis-cli is described in the RedisGraph documentation.

$ redis-cli
127.0.0.1:6379> GRAPH.QUERY MotoGP "CREATE (:Rider {name:'Valentino Rossi'})-[:rides]->(:Team {name:'Yamaha'}), (:Rider {name:'Dani Pedrosa'})-[:rides]->(:Team {name:'Honda'}), (:Rider {name:'Andrea Dovizioso'})-[:rides]->(:Team {name:'Ducati'})"
1) 1) Labels added: 2
   2) Nodes created: 6
   3) Properties set: 6
   4) Relationships created: 3
   5) "Query internal execution time: 0.399000 milliseconds"

Now that our MotoGP graph is created, we can start asking questions, for example: Who's riding for team Yamaha?

127.0.0.1:6379> GRAPH.QUERY MotoGP "MATCH (r:Rider)-[:rides]->(t:Team) WHERE t.name = 'Yamaha' RETURN r.name, t.name"
1) 1) "r.name"
   2) "t.name"
2) 1) 1) "Valentino Rossi"
      2) "Yamaha"
3) 1) "Query internal execution time: 0.625399 milliseconds"

How many riders represent team Ducati?

127.0.0.1:6379> GRAPH.QUERY MotoGP "MATCH (r:Rider)-[:rides]->(t:Team {name:'Ducati'}) RETURN count(r)"
1) 1) "count(r)"
2) 1) 1) (integer) 1
3) 1) "Query internal execution time: 0.624435 milliseconds"

Building

Compiling

Requirements:

  • The RedisGraph repository: git clone --recurse-submodules -j8 https://github.com/RedisGraph/RedisGraph.git

  • On Ubuntu Linux, run: apt-get install build-essential cmake m4 automake peg libtool autoconf

  • On OS X, verify that homebrew is installed and run: brew install cmake m4 automake peg libtool autoconf.

    • The version of Clang that ships with the OS X toolchain does not support OpenMP, which is a requirement for RedisGraph. One way to resolve this is to run brew install gcc g++ and follow the on-screen instructions to update the symbolic links. Note that this is a system-wide change - setting the environment variables for CC and CXX will work if that is not an option.

To build, run make in the project's directory.

Congratulations! You can find the compiled binary at src/redisgraph.so.

Running tests

First, install required Python packages by running pip install -r requirements.txt from the tests directory.

If you've got redis-server in PATH, just invoke make test.

Otherwise, invoke REDIS_SERVER=<redis-server-location> make test.

For more verbose output, run make test V=1.

Loading RedisGraph into Redis

RedisGraph is hosted by Redis, so you'll first have to load it as a Module to a Redis server: running Redis v5.0.7 or above.

We recommend having Redis load RedisGraph during startup by adding the following to your redis.conf file:

loadmodule /path/to/module/src/redisgraph.so

In the line above, replace /path/to/module/src/redisgraph.so with the actual path to RedisGraph's library. If Redis is running as a service, you must ensure that the redis user (default) has the necessary file/folder permissions to access redisgraph.so.

Alternatively, you can have Redis load RedisGraph using the following command line argument syntax:

~/$ redis-server --loadmodule /path/to/module/src/redisgraph.so

Lastly, you can also use the MODULE LOAD command. Note, however, that MODULE LOAD is a dangerous command and may be blocked/deprecated in the future due to security considerations.

Once you've successfully loaded RedisGraph your Redis log should have lines similar to:

...
30707:M 20 Jun 02:08:12.314 * Module 'graph' loaded from <redacted>/src/redisgraph.so
...

If the server fails to launch with output similar to:

# Module /usr/lib/redis/modules/redisgraph.so failed to load: libgomp.so.1: cannot open shared object file: No such file or directory
# Can't load module from /usr/lib/redis/modules/redisgraph.so: server aborting

The system is missing the run-time dependency OpenMP. This can be installed on Ubuntu with apt-get install libgomp1, on RHEL/CentOS with yum install libgomp, and on OSX with brew install libomp.

Using RedisGraph

You can call RedisGraph's commands from any Redis client.

With redis-cli

$ redis-cli
127.0.0.1:6379> GRAPH.QUERY social "CREATE (:person {name: 'roi', age: 33, gender: 'male', status: 'married'})"

With any other client

You can interact with RedisGraph using your client's ability to send raw Redis commands.

Depending on your client of choice, the exact method for doing that may vary.

Python example

This code snippet shows how to use RedisGraph with raw Redis commands from Python via redis-py:

import redis

r = redis.StrictRedis()
reply = r.execute_command('GRAPH.QUERY', 'social', "CREATE (:person {name:'roi', age:33, gender:'male', status:'married')")

Client libraries

Some languages have client libraries that provide support for RedisGraph's commands:

Project Language License Author Stars
redisgraph-py Python BSD Redis Labs redisgraph-py-stars
JRedisGraph Java BSD Redis Labs JRedisGraph-stars
redisgraph-rb Ruby BSD Redis Labs redisgraph-rb-stars
redisgraph-go Go BSD Redis Labs redisgraph-go-stars
redisgraph.js JavaScript BSD Redis Labs redisgraph.js-stars
ioredisgraph JavaScript ISC Jonah ioredisgraph-stars
@hydre/rgraph JavaScript MIT Sceat rgraph-stars
redis-modules-sdk TypeScript BSD-3-Clause Dani Tseitlin redis-modules-sdk-stars
php-redis-graph PHP MIT KJDev php-redis-graph-stars
redislabs-redisgraph-php PHP MIT mkorkmaz redislabs-redisgraph-php-stars
redisgraph_php PHP MIT jpbourbon redisgraph_php-stars
redisgraph-ex Elixir MIT crflynn redisgraph-ex-stars
redisgraph-rs RUST MIT malte-v redisgraph-rs-stars
redis_graph RUST BSD tompro redis_graph-stars
NRedisGraph C# BSD tombatron NRedisGraph-stars
RedisGraphDotNet.Client C# BSD Sgawrys RedisGraphDotNet.Client-stars

Documentation

Read the docs at redisgraph.io.

Mailing List / Forum

Got questions? Feel free to ask at the RedisGraph forum.

License

Redis Source Available License Agreement - see LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].