RedisGraph: A High Performance In-Memory Graph Database as a Redis Module


Graph based data is everywhere now days, Facebook, Google, Twitter and Pinterest are only a few who’ve realize the power behind relationship data and are utilizing it to the fullest, as a direct result we see a rise both in interest and variety of graph data solutions.

With the introduction of Redis Modules we’ve seen the great potential of introducing a graph data structure to Redis arsenal, a native C implementation with emphasis on performance was developed to bring new graph database capabilities to Redis, the RedisGraph is now available as an open source project on GitHub.

In this document we’ll discuss the internal design and feature of RedisGraph and demonstrate its current capabilities.

RedisGraph At-a-Glance

RedisGraph is a graph database developed from scratch on top of Redis, using the new Redis Modules API to extend Redis with new commands and capabilities. Its main features include: – Simple, fast indexing and querying – Data stored in RAM, using memory-efficient custom data structures – On disk persistence – Tabular result sets – Simple and popular graph query language (Cypher) – Data Filtering, Aggregation and ordering

A Little Taste: RedisGraph in Action

Let’s look at some of the key concepts of RedisGraph using this example over the redis-cli tool:

Constructing a graph:

It is a common concept to represent entities as nodes within a graph, In this example, we’ll create a small graph with both actors and movies as its entities, an “act” relation will connect actors to movies they casted in. We use the graph.QUERY command to issue a CREATE query which will introduce new entities and relations to our graph.

graph.QUERY <graph_id> 'CREATE (:<label> {<attribute_name>:<attribute_value>,...})'

From Cop Car Data Terminal, To Retro Computer

It is possible that you will have lived your life without ever coming into contact with a Motorola MDT9100-T. The data terminal of choice for use in police cars across the globe was a computer with a full-sized QWERTY keyboard, a small CRT display, a mainboard sporting an Intel 386SX processor, and a custom version of Windows 3.1. [Trammell Hudson] and some friends from NYC Resistor scored some MDT9100s in an online auction and found them to be just too good an opportunity not to crack them open and see what could be done.