Graph quick start
Objectives
By the end of this tutorial, you will be able to:
- Describe what Aerospike Graph is and how it works with Aerospike Database to store and query data.
- Define the Property Graph Model and execute Gremlin queries against a sample data set.
- Set up Aerospike Graph in Docker, clone a demo repository, and run a Python example app.
- Load a sample data set into AGS and run Gremlin commands to add vertices and query the data.
Aerospike Graph
Aerospike Graph is an application layer that exists on top of Aerospike Database. We refer to this layer as Aerospike Graph Service (AGS for short).
AGS abstracts away the complexities of the Aerospike Database so that you can focus on modeling data and data queries. With AGS, you get the advantage of loading astronomical amounts of data and performing millions of queries extremely fast.
About Graph Data Modeling

Graph data modeling is simply one way to represent how data is related to other data. Think about use cases where relational data would be most useful. Some examples might include fraud detection, recommendation systems, social networks, and more.
Whether you’re a data scientist looking to perform comprehensive analysis, or a developer looking to incorporate transactional data processing, you will need to format your data to suit a particular graph data model. Aerospike Graph uses the Property Graph Model by way of Gremlin. Gremlin is the graph traversal language used with AGS that works for both Online Transaction Process (OLTP) AND Online Analytical Processing (OLAP) traversals. Semantically, it is a relatively easy language to pick up.
Property Graph Model

In the Property Graph Model, vertices (also known as nodes) represent things like people, devices, locations, and more.
Each vertex can have many properties. A userId
, for example, may have properties for the user’s name, email, phone number, location, and billing zip code. Properties are useful for filtering and analyzing data, like listing all users in a specific billing zip code that have posted transactions at a certain time of day.
Edges connect vertices to establish a relationship. A userId
vertex may be connected to a device
vertex with the relationship declaring the device as trusted
(i.e., verified). The edge in this case is trusted
and visually it connects the userId
to the device
. Edges in AGS are unidirectional, meaning the relationship is directed from one vertex to another, but can be traversed in either direction.