View Current
Viewing Revision #10 from 04/01/2023 12:31 p.m.

RedisGraph is a graph database built on Redis.

RedisGraph is technically a Redis module for extending graph database capabilities. RedisGraph adopts a property graph data model. Graphs in RedisGraph are represented as sparse adjacency matrices. RedisGraph uses GraphBLAS, a community-led project defining a linear algebraic interface for implementing graph algorithms, to represent sparse matrices. RedisGraph exposes Cypher as its query language.

Based on their implementation, RedisGraph uses the *tuple-at-a-time* model to process queries.

Graph-related operators are mainly implemented with GraphBLAS:SuiteSparse, a linear algebra package for implementing graph algorithms based on GraphBLAS. For example, the Conditional Traverse operator contains a breadth-first search traversal algorithm. The breadth-first search traversal algorithm uses matrix-matrix multiplication from GraphBLAS:SuiteSparse.

Some operators allow tuples to be batched before executing the operators' logic; for instance, the Conditional Traverse operator allows tuples to be batched before calling matrix-matrix multiplication.

RedisGraph allows users to provide their stored procedures written in C. Each stored procedure must be provided and registered before compiling the RedisGraph module.

The valid stored procedure must contain a stored procedure name, a number of input arguments, an output specification (i.e., output data types, output field names), and three main routines. The three main routines include `Invoke`

, `Step`

, and `Free`

. `Invoke`

will be called first after the stored procedure is called. Then, `Step`

will be called multiple times to produce a result tuple per `Step`

call. Finally, `Free`

will be called to clean up allocated memory. Users may store the state of each procedure call using the `private_data`

pointer shared across these routines.

View Current
Viewing Revision #10 from 04/01/2023 12:31 p.m.

https://github.com/RedisGraph/RedisGraph

https://redis.io/docs/stack/graph/

Redis Ltd.

2018