krlawrence/graph

Practical Gremlin - An Apache TinkerPop Tutorial

What is this project? This repository hosts everything needed for the book Practical Gremlin: An Apache TinkerPop Tutorial. The book teaches readers how to use Gremlin, the query language for graph databases, with hands-on examples. The repo contains the book's source text, sample queries, code, and a large dataset of airline routes (called air-routes) used in the examples.

Who is it for? Programmers, data analysts, and anyone who wants to learn Gremlin by working with real-world graph data. The book assumes no prior Gremlin knowledge and starts with basics before moving to advanced topics.

Key contents and features:

  • The book itself – currently in its second edition, which targets TinkerPop version 3.8.0. It is a living book, meaning it receives frequent updates. The latest version is automatically published as changes are made.
  • Readable formats – the book is available as HTML, PDF, and a Markdown version (via llms.txt) for easy access. Older editions are archived in various formats (EPUB, MOBI, etc.) and are kept as snapshots.
  • Sample data and code – the air-routes dataset (a graph of 3,504 airports and 50,637 flight routes) is included, along with Java and Groovy sample programs and demo files. All examples are designed to work directly with this dataset in the Gremlin Console and TinkerGraph.
  • Organization – the repo has folders like /book (source manuscript in AsciiDoc), /sample-data, /sample-code, /images, and /demos. There is also a tool to generate or manipulate the air-routes data.

Current state & history:

  • The second edition was completed around January 2026, after starting in September 2023. It targets TinkerPop 3.8.0 because that version's Gremlin semantics are expected to remain stable up to version 4.0.0.
  • The first edition (covering versions before 3.8.0) is archived and no longer updated, but its final version is available via a tagged release and an archived HTML link.

How to access it – the latest versions are freely readable online at krlawrence.github.io/graph/, and the full source is here on GitHub. The project welcomes feedback and contributions via issues.

In short, this is a complete, open‑source teaching resource for learning Gremlin through realistic, hands‑on examples.

Related

  • Project
  • Project
  • Project
  • Project