Skip to content

Getting Started

Impulse Graph executes read-only graph queries directly over memory-mapped .imps snapshot files across pluggable execution runtimes—including the Pure JVM Engine (Java 21 LTS / 25, Kotlin, Scala 3, Clojure) and the Native C++20 / C-ABI Engine (C/C++, Rust, Python, Go, .NET, Node.js).

  1. Build an .imps snapshot containing typed node domains, CSR/CSC adjacency arrays, and columnar SoA attributes.
  2. Mount the file directly from disk via mmap without running a database server.
  3. Query in-process via schema-generated AOT builders, the Fluent Traversal API, read-only openCypher, ImpLog, or ImpK.

Choose Your Entrypoint

Start with the architectural guide or ecosystem hub that matches your workload:

Your Goal or Stack Problem-First Guide Ecosystem Hub
Python Data Science, Parquet & GNNs From NetworkX & Parquet to .imps — Replace slow dict deserialization and full-RAM CSR copies with shared mmap snapshots. Python & PyTorch Hub
Java / JVM Microservices & ReBAC Embedded .imps vs. Networked Graph DB — Eliminate network/JSON serialization overhead with in-process FFM snapshots and CQRS read projections. Java & JVM Hub
Cross-Team Data + Service + ML Pipelines Polyglot "Parquet for Graphs" Workflow — Compile .imps once from Parquet/Spark and mount the identical file in Java 25 and Python/PyTorch. Native, Rust & Polyglot Hub

How Queries Work: The Two Core Mechanics

Before writing your first query, it helps to understand two mechanics that make Impulse Graph fundamentally different from relational SQL joins and traditional graph databases:

1. Start in One Domain, Walk 0..N Edges, Finish in One Target Domain

Every query in Impulse Graph is a directional pipeline that moves an active frontier of nodes from one Domain to another:

flowchart LR
    D0["1. Start Domain (e.g. User)\nSeed: 'usr_alice' or [1, 2, 3]\nOptional .filter('node.age >= 21')"] -->|".out('PLACED')"| D1["2. Intermediate Domain (Order)\nActive Order Frontier\nOptional .filter(...) / .project(...)"]
    D1 -->|".out('CONTAINS')"| D2["3. Target Domain (Product)\nReturns Surviving Product Nodes:\n• IDs / Business Keys\n• Target Attributes\n• Projected State / Aggregates"]
  • Start with a Single Domain: You anchor the traversal to one starting domain (e.g., snap.domain("User")) and choose your starting nodes (a single node, a list of IDs/keys, a bitset, or all nodes in the domain).
  • Walk Zero or More Edges:
  • Walking 0 edges simply filters or projects attributes within that starting domain (User \(\to\) User).
  • Each .out(...) or .in(...) step transitions the active frontier across a directed relation into the next domain (User \(\to\) Order \(\to\) Product).
  • Finish in a Single Target Domain: Unlike a SQL JOIN that returns a wide Cartesian table of columns from every intermediate hop at once, an Impulse traversal finishes at a single target domain (e.g., Product) and returns the surviving nodes in that domain—their Dense IDs, External Business Keys, target domain attributes, or projected/aggregated state carried along the walk.

2. Set Behavior (Not Multi-Sets) & Collapsing Intermediate Results

Most databases (SQL JOINs, standard Cypher, Gremlin) operate on multi-sets (bags of paths). If you start from 100 users who placed 5,000 orders that all point to the same 10 popular products, a traditional engine produces 5,000 duplicate intermediate rows—and on the next hop (Product -> Category), it walks out of those same 10 products 5,000 separate times ("path explosion").

Impulse Graph operates on Sets, not Multi-Sets. At every step, intermediate results converging on the same node are immediately collapsed (reduced) together before the next hop begins:

  • Pure Reachability (Set Union): The active frontier in a domain is a BitSet (1 bit per node). If 500 different edges land on Product #42 during a hop, bit 42 is simply set to 1 via bitwise OR. On the next hop, Impulse walks out of Product #42 exactly once.
  • Carrying Computed Values Across Hops (Monoidic Reduction): What if each incoming path carries a number—like an order amount, a hop distance, or a risk_score—and multiple paths land on the same target node? You specify a simple reduction rule (a monoid) that tells the engine how to collapse converging values into a single value per target node:
  • SUM (+): Add converging values together (e.g., total money transferred into an account, or PageRank weight).
  • MIN: Keep the smallest value (e.g., shortest path distance or earliest timestamp).
  • MAX: Keep the largest value (e.g., maximum transaction size or highest confidence score).
  • ANY / OR: Boolean reachability.

Because intermediate results are collapsed into a fixed-size per-domain set at every hop, queries never suffer from exponential path explosion, and the engine knows the exact memory required for the query before it even runs.


Step-by-Step Guide

  1. Installation: Add the Pure Java Maven/Gradle dependencies, C/C++ CMake package, Python wheel, or standalone CLI (impulse-graph / impulse-j).
  2. Quickstart: Build an .imps file (from CSVs with impulse build or in Java) and run your first traversal in < 20 lines of code.
  3. Core Concepts & Glossary: A visual primer on CSR/CSC matrices, per-domain dense IDs (\(0 \dots N_d-1\)), domain-to-domain set reduction, and SoA attributes.
  4. Building Snapshots (Java): Step-by-step tutorial building .imps snapshots programmatically in Java and streaming from relational databases via JDBC.
  5. Building Snapshots (CLI, CSV/Parquet & Python/PyTorch): Compile .imps snapshots from Apache Parquet and CSV files using the impulse CLI and query/train on them in Python and PyTorch.
  6. Changing Data & Live Updates: < 5 min near-real-time rebuilds, S3/GCS distribution, and zero-downtime Blue/Green swaps.
  7. Querying & DSLs Decision Matrix: Choose the right query interface (Fluent/AOT API, CEL, openCypher, ImpLog, or ImpK) for your application.